[email protected] said:
> I think a race condition inherent to the setup of one errno per context makes 
> sharing a single context amongst several threads, each with their own socket, 
> very problematic.

errno uses thread-local storage on all modern systems. i.e. the variable is
"magic" in the sense that to you as a developer it looks like an ordinary
global but in fact each OS thread has its own instance.

> Am I crazy, did I find a bug, or what?

Things to check:

1) are you building your C code with -D_REENTRANT and/or -pthread? If not,
your C library may be giving you the old non-TLS global errno.

2) are you correctly including <errno.h>? this may also have an impact.

hth,

-mato
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to