# Defects related to signal usage in Ruby 1.9 implementation

**URL:** <https://www.ruby-forum.com/t/defects-related-to-signal-usage-in-ruby-1-9-implementation/121608>\
**Category:** Ruby\
**Created:** [November 29, 2007, 8:17am UTC](https://www.ruby-forum.com/t/defects-related-to-signal-usage-in-ruby-1-9-implementation/121608 "2007-11-29T08:17:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chirag\_mistry\_ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ec9cab/32.png) [@chirag\_mistry\_ruby](https://www.ruby-forum.com/u/chirag_mistry_ruby)\
**Post date:** [November 29, 2007, 8:17am UTC](https://www.ruby-forum.com/t/defects-related-to-signal-usage-in-ruby-1-9-implementation/121608/1 "2007-11-29T08:17:57Z")

</div>

Hi

We have study the code of yarv (Ruby 1.9 implementation) and as per our  
understanding there are few defects related to signal usage in Ruby 1.9  
implementation. It would be better if all those defects are fixed.

1. In file trunk/signal.c, at line number 788:  
SIGVTALRM seems a reserved signal in the ruby interpreter as per  
implementation of trap function of Signal module. But, we did not find  
any reference related with usage of this signal. In earlier versions of  
ruby, SIGVTALRM was used to implement cooperative multitasking (user  
space multithreading) and this signal was reserved for proper  
functioning of Thread module. So in Ruby 1.9, SIGVTALRM is not used any  
more. Empty signal handler is installed for SIGVTALRM in  
Init\_native\_thread() function.

2. In file trunk/eval.c, at line number 144:  
In ruby\_finalize\_1 function, signal handler SIG\_DFL is installed for  
SIGINT signal. It gets called automatically when ruby interpreter is  
unloaded (normally or abnormally).  
It may create problem when ruby interpreter is embedded in a process for  
a limited period of time. Because ruby\_finalize\_1 sets signal handler  
for SIGINT to SIG\_DFL without checking previously installed signal  
handler.
