zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.71k stars 2.35k forks source link

Problem: message can't be received due to signal #4488

Closed ilkondr closed 1 year ago

ilkondr commented 1 year ago

Issue caught in Golang runtime, which widely uses signal SIGURG for scheduling. Sometimes messages cannot be received. Technically socket_base_t::process_commands() returns failure even if some commands were processed, but next message from mailbox could not be received during interrupt.

Solution: retry receiving from mailbox with zero timeout after EINTR.

Signed-off-by: Ilya Kondrashkin ikondrashkin@nfware.com

bluca commented 1 year ago

Please add a relicense statement https://github.com/zeromq/libzmq/tree/master/RELICENSE

ilkondr commented 1 year ago

Please add a relicense statement https://github.com/zeromq/libzmq/tree/master/RELICENSE

added