zeromq / czmq

High-level C binding for ØMQ
czmq.zeromq.org
Mozilla Public License 2.0
1.18k stars 525 forks source link

zloop: nonstop does not work as intended (EINTR breaks loop) #2284

Closed oko256 closed 5 months ago

oko256 commented 5 months ago

If zloop is set as nonstop and a SIGINT signal arrives while the poll is blocking, regardless of the attached signal handler (which indeed will be run) it will still cause the poll to return failure with errno set to EINTR. For proper nonstop functionality, this should be checked and the loop should be continued regardless of EINTR if nonstop mode is enabled (to be in line with the description of nonstop mode in the first place).

sphaero commented 5 months ago

If you have access to Windows have you ever experienced random crashes on poll?

oko256 commented 5 months ago

I have couple applications that run on Windows and use zpoller extensively, but have not experienced random crashes on poll at all. If there's more information about these cases then I can surely try to help debug those.