[zeromq-dev] Interrupted systen call

Diego Fons diego.fons at intraway.com
Wed Nov 26 20:16:45 CET 2014


Hi,

I'm facing a weird situation, this mail is just to know if someone has
already deal with this and, if so, how can I solve it.

I'm using the C++ wrapper (Linux) and I have this piece of code:

01 std::string error_descr;
02 bool sent = false;
03 try
04 {
05     // Build ZMQ frame to send message.
06     zmq::message_t frame;
07     frame.rebuild( message->size() );
08     memcpy( frame.data(), message->data(), message->size() );
09
10     // Send ZMQ frame.
11     sent = zmq_socket.send( frame );
12 }
13 catch( zmq::error_t& e )
14 {
15     // An interruption (signal?) prevented the message being sent.
16     sent = false;
17     error_descr = e.what();
18 }
19
20 if( not sent )
21 {
22     std::cout << "Message could not be sent: " << error_descr;
23 }

Line 11 is throwing and exception because the message in line 22 is shown:

Message could not be sent: Interrupted system call

I'm confused since the send method in zmq::socket_t prevent the exception
throwing by asking if the return code is EAGAIN. Anyway, I serach the code
and the message "Interrupted system call" is not part of the linux build.

​Is it possible?​ What am I missing?

Regards.

-- 
Diego Andrés Fons
Intraway Corp.
Solution Developer
AR Office: +54 (11) 6040 4000
US Office: +1 (516) 620 3890
Email: diego.fons at intraway.com

Visit our website at http://www.intraway.com
Proud to be an ISO 9001:2008 certified company
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20141126/64db65dd/attachment.htm>


More information about the zeromq-dev mailing list