[zeromq-dev] weird bug

Andrew Hume andrew at research.att.com
Mon Mar 5 14:31:33 CET 2012


i think a man page tweak is probably sufficient.

now that my code handles this properly, i see it as a laziness thing.
it reminds my of EAGAIN; nearly all C code does NOT handle this correctly.
but in most environments, it doesn't bite you.
but the first time you run in Mac os/x, you sure do.

i resolved it by adding yet another "m" routine;
mrecv handles the msg_init, and deals with EAGAIN as well as EINTR.

On Mar 4, 2012, at 9:44 PM, Lucas Hope wrote:

> Hi Pieter,
> 
> The real issue with it for me, is that as a binding user (and high abstraction-level programmer), the error is rather confusing. Especially since it will mainly work fine, until there is some thread usage, whereupon the code will stop working intermittently. A less persistent (or time poor) person may just hold back on upgrading or drop the library altogether.
> 
> This seems like a great place for a socket option, HANDLE_EINTR or something, and have handling the signal be the default, since almost always it is what people would want, IMHO. Indeed, this was originally the case, and was changed with only a little announcement. I feel most users (extrapolating from me :P) wouldn't even have understood the ramifications of the change from the email thread when it was discussed.
> 
> Cheers,
> 
> -Luke
> 
> On Mon, Mar 5, 2012 at 12:33 PM, Pieter Hintjens <ph at imatix.com> wrote:
> On Mon, Mar 5, 2012 at 2:15 AM, Andrew Hume <andrew at research.att.com> wrote:
> > thanks, pieter.
> > i started doing a diff on teh code and found this.
> >
> > i, like lucas, am programming around this, but i think its worth a mention
> > in the man page because before this fix, we essentially never saw
> > EINTR, but afterwards, we do quite often. so the sample code is IMHO
> > inadequate.
> 
> Want to send a pull request with improvements?
> 
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> 
> 
> 
> -- 
> ---------------------------------------------------
> Dr Lucas Hope - lucas.r.hope at skype
> Machine Learning and Software Engineering Consultant
> Melbourne, Australia
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev


------------------
Andrew Hume  (best -> Telework) +1 623-551-2845
andrew at research.att.com  (Work) +1 973-236-2014
AT&T Labs - Research; member of USENIX and LOPSA




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


More information about the zeromq-dev mailing list