[zeromq-dev] Returning EINTR on interrupted non-blocking calls
sustrik at 250bpm.com
Wed Nov 18 12:50:55 CET 2009
I've implemented the EINTR thing, however, it turns out that it won't be
of much help in multithreaded environment - the signal is delivered to a
single thread, leaving other threads blocked in the blocking call :(
I'm not checking it in as it doesn't seem to be useful.
Returning EINTR on interrupted non-blocking calls
Matias GUIJARRO <matias.guijarro at esrf.fr>
Tue, 17 Nov 2009 10:26:13 +0100
zeromq-dev-bounces at mail.imatix.com
I think it's a good idea. Much cleaner.
Martin Sustrik wrote:
> Btw, I gave your example program a thought and my feeling is that the
best way to handle this kind of thing is to break non-blocking calls
(send, recv, poll) when signal arrives the same way that POSIX sockets
do, i.e. to return EINTR error code. That way you'd be able to check
whenther Ctrl+C have arrived and terminate your application neatly.
More information about the zeromq-dev