[Haskell-cafe] syscall, sigpause and EINTR on Mac OSX
joelr1 at gmail.com
Sun Dec 11 15:48:31 EST 2005
On Dec 11, 2005, at 8:35 PM, Donn Cave wrote:
> Now if you actually have observed that your SIGINT handler was entered
> at this point, then please ignore me.
Yes, I have observed my SIGINT handler being triggered out of nowhere.
Since I'm printing the signal# in the handler I actually know that it
Since we are dealing with computers and magic is out of the question
I can only
think of Mac OSX sending SIGINT when the program went over some
Probably not, though, as I left it running in gdb, went to sleep,
woke up about
an hour and a half later to see that the program stopped after about
and dropped into the debugger with a SIGINT. gdb has nothing to do
as I saw it happen outside of the debugger.
For the record, I often ^C the program as it's supposed to run forever,
with poker bots just sitting their, playing and grabbing more money
when they run out of it. The C++/Windows server is not very good at
abrupt disconnects so it helps when certain commands are sent to it
a client disconnects. This is what I do in the SIGINT handler by
events into each thread's mailbox.
I sorely miss the Erlang REPL here, btw, with its ability to send
to various running processes and such. I'm also thinking of designing
class in Haskell to emulate Erlang processes, together with the
infrastructure to keep track of processes, their message counts, etc.
I do not want to recode my stuff in Erlang as Erlang FFI makes me
grind my teeth
and I would need to use it to get to the OpenSSL BIO API and for ZLib.
I also invested over two months into the Haskell project by now and
it's 95% done.
More information about the Haskell-Cafe