Merge pull request #4488 from ilkondr/ilkondr/poll_eintr

Problem: message can't be received due to signal
This commit is contained in:
Luca Boccassi 2023-01-10 18:55:45 +00:00 committed by GitHub
commit 049f79f72e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 5 deletions

13
RELICENSE/nfware.md Normal file
View File

@ -0,0 +1,13 @@
# Permission to Relicense under MPLv2 or any other OSI approved license chosen by the current ZeroMQ BDFL
This is a statement by NFWare Corp. that grants permission to relicense its copyrights in the libzmq C++
library (ZeroMQ) under the Mozilla Public License v2 (MPLv2) or any other
Open Source Initiative approved license chosen by the current ZeroMQ
BDFL (Benevolent Dictator for Life).
A portion of the commits made by the Github handle "ilkondr", with
commit author "Ilya Kondrashkin <ikondrashkin@nfware.com>", are copyright of NFWare.
This document hereby grants the libzmq project team to relicense libzmq,
including all past, present and future contributions of the author listed above.
Ilya Kondrashkin 2023/01/10

View File

@ -1504,15 +1504,17 @@ int zmq::socket_base_t::process_commands (int timeout_, bool throttle_)
command_t cmd;
int rc = _mailbox->recv (&cmd, timeout_);
if (rc != 0 && errno == EINTR)
return -1;
// Process all available commands.
while (rc == 0) {
cmd.destination->process_command (cmd);
while (rc == 0 || errno == EINTR) {
if (rc == 0) {
cmd.destination->process_command (cmd);
}
rc = _mailbox->recv (&cmd, 0);
}
if (errno == EINTR)
return -1;
zmq_assert (errno == EAGAIN);
if (_ctx_terminated) {