Posix.installHandler issues.

Volker Stolz stolz@i2.informatik.rwth-aachen.de
Thu, 5 Dec 2002 11:30:58 +0100


In local.libraries, you wrote:
> solution: add another argument to Posix.installHandler which takes a
> list of flags as described in sigaction(3) (including SA_ONESHOT). I
> apologize if i am misinterpreting the behavior of my program.

I'm not sure that the other flags are (generally) useful or apply
at all to Haskell (e.g. SA_NODEFER: is a Haskell-handler equivalent
to a C signal handler?).

Furthermore, it's probably not necessary to break the API. How about
a new function with the parameter indicating ONESHOT or not and then
expressing installHandler through this? I don't like primInstallHandler
or installHandler', so if somebody has a suggestion...

BTW: One might argue that you could simply write your own in-Haskell
signalstack by simply setting MVars/Semaphores in the signal handler
and then have one Concurrent Haskell thread which decides what to do
with those 'signals'. 
-- 
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME