[zeromq-dev] Signal handling in blocking zmq_recv
Martin Sustrik
sustrik at 250bpm.com
Mon Mar 8 08:05:26 CET 2010
Chris,
> When I'm playing around with ZMQ, I notice that once a process is
> block in zmq_recv waiting for incoming message, it won't respond to
> SIGTERM or SIGQUIT. I have to SIGKILL it in order to terminate a
> process that's block on zmq_recv. What's the signal handling model
> in ZMQ? I couldn't find any documentation about it. Does it have
> signal handlers that have overridden the default behaviors?
Here are the relevant answers from 0MQ FAQ:
My Python/Ruby application isn't responding to signals, why is ØMQ
mucking with my signal handlers?
It's not. However, ØMQ uses native I/O threads to offload I/O in the
background. Unfortunately, the current state of affairs is that signal
handling in Python and Ruby applications which use native threads is
broken. Any help from the Python or Ruby communities on fixing this
would be much appreciated.
I can't Ctrl-C my Python/Ruby application. Help!
See above. As a workaround we've found that on POSIX systems Ctrl-\
seems to work as long as your application doesn't try to install a
handler for SIGQUIT.
Martin
More information about the zeromq-dev
mailing list