[zeromq-dev] Interrupted systen call

Alexey Komarov alexey at komarov.org.ru
Wed Nov 26 21:08:11 CET 2014


Hi,

As I understand it's EINTR error. It can occur when your application 
gets a signal, i.e. SIGCHLD.

Alexey


On 11/26/2014 10:16 PM, Diego Fons wrote:
> 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 <mailto:diego.fons at intraway.com>
>
> Visit our website at http://www.intraway.com <http://www.intraway.com/>
> Proud to be an ISO 9001:2008 certified company
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20141126/b31c89ab/attachment.htm>


More information about the zeromq-dev mailing list