signals and GHC 6.10
john at repetae.net
Thu Jul 9 15:59:51 EDT 2009
On Thu, Jul 09, 2009 at 10:01:37AM -0700, Don Stewart wrote:
> > I noticed that programs compiled with GHC 6.10 seem to be eating signals
> > and exiting with an error code of 255, rather than the proper exit code
> > for the signal that killed the process.
> > I can understand that the GHC runtime may need to perform some cleanup
> > on a SIGINT or other signal, but instead of doing an exit after catching
> > it, could it be modified to restore the original handle (which may be
> > none) and reraise the signal via kill(getpid(), sig)? This is much
> > friendlier and standard behavior and will also ensure any chained signal
> > handlers are run properly. (in addition to giving proper exit codes).
> Hmm. Do you have code that reproduces this?
> Our signal handling code seems to be running fine here, with multiple
> editions of 6.10.x
Yes, you are right. ghc 6.10 appears to be doing the right thing. It was
6.8 that was odd, between the change in exceptions and my old workaround
for 6.8 I got somewhat mixed up.
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
More information about the Glasgow-haskell-users