[zeromq-dev] Problems with errno on Win32

Martin Sustrik sustrik at 250bpm.com
Mon Feb 22 22:58:43 CET 2010


Martin Sustrik wrote:

> Definitely. Each CRT has it's own errno. If different components in the 
> program use different CRTs they won't share the errno value. The result 
> will look exactly like what you are seeing: library asks the CRT to set 
> errno to 11, exits from function, returns to the caller component. The 
> caller checks errno from the CRT it is linked with (not the CRT the 
> library used!) and finds out it's value is zero :|

Btw, there's an easy way to test this. Just add a new function to the 
library:

int zmq_errno ()
{
     return errno;
}

And use it from pyzmq to check the error code. You should get 11 not 0.

Martin



More information about the zeromq-dev mailing list