I can't get Posix.installHandler to do what I expect it to do.  Attached is a sample 
program.
If my reading of the documentation is correct, this should prompt with ">0" for a reply
repeatedly until the user interrupts, after which it replaces the current continuation 
with
the supplied handler, thus printing out "Interrupted!", and continuing to prompt with 
"1>".
And so on.  Following is a sample trace (Sparc/Solaris as always).  Note (1) just 
before
^C an extra input line seems to get inserted.  (2) Somehow the supplied handler doesn't
keep going, instead we return to the old continuation, for no reason I can see.
What is going on?


0>^C
You typed 
0>Interrupted!1>
You typed 
0>^Casdf
You typed asdf
0>Interrupted!1>
You typed

TestInterrupt.hs

Reply via email to