On Mon, 6 Dec 2010 15:29:51 -0600 Jonathan Nieder wrote: > Francesco Poli wrote: > > On Sat, 27 Nov 2010 17:49:08 -0600 Jonathan Nieder wrote: > >> Francesco Poli wrote: > > >>> I have somewhat good news for you: I prepared a patch that moves the > >>> trap instruction before everything else, in order to intercept early > >>> SIGINTs too. > [...] > > I've just pushed the commit to the > > public git repository. > > I think there is a ruby (documentation?) bug here: for example [...] > Kernel.trap("SIGINT", "SIG_DFL") [...] > doesn't actually set the handling of SIGINT to SIG_DFL at all, but > makes it print a backtrace.
Mmmmh, according to http://ruby-doc.org/core/classes/Kernel.html#M005975 "SIG_DFL" should cause the operating system's default handler to be invoked... Which is the default handler for SIGINT? Maybe printing a backtrace and exiting with 130 status is the default handler behavior? After all, this is the default behavior, when no trapping is set... I am not sure, since I am not a signal trapping expert, but it seems to me that Ruby behaves as documented, here. > Given that bug, your patch would seem to > be the best we can do. So I like it. Thanks a lot for looking at my patch and for testing it! :-) The patch will most probably be part of the next upload (whenever this happens!). Bye and thanks again for your help. -- http://www.inventati.org/frx/progs/scripts/pdebuild-hooks.html Need some pdebuild hook scripts? ..................................................... Francesco Poli . GnuPG key fpr == C979 F34B 27CE 5CD8 DC12 31B5 78F4 279B DD6D FCF4
pgpDJvTo3YmS6.pgp
Description: PGP signature