From: Robert Klemme Date: 2007-10-05T22:10:05+09:00 Subject: Re: Signal handling strangeness (Linux) 2007/10/4, Han Holl : > On 10/4/07, Bertram Scharpf wrote: > > > > I didn't examine it thoroughly but "exit" seems to raise an > > exception "SystemExit". This exception will probably not be > > raised before the wait statement finishes. The default > > signal handler for 'TERM' will not raise anything but rather > > try to stop the whole Ruby process. > > > Now I notice that a ruby script that is terminated with an external > 'kill -TERM' does _not_ run the at_exit() proc. > Because TERM is intended to enable processes to terminate gracefully > (cleaning up after themselves), this seems a bit harsh, but it seems > to be standard Unix behaviour. > > Still, this deadlock is annoying. Why do you resort to "tail" at all? You could implement this pretty easy in Ruby itself. Then you do not face this issue plus you are more independent of your local system installation. IIRC I provided an implementation in some posint a while ago and I believe there is also a tail version in RAA. Kind regards robert