[zeromq-dev] Recovering POSIX errno

Chris Wong chris at chriswongstudio.com
Fri Apr 16 04:07:59 CEST 2010


There is an example in the man page of zmq_strerror.

Basically, it uses the same thread-local errno variable.  Not sure if it's thread-local on Windows though.

Chris

On Apr 11, 2010, at 9:36 PM, Derek Developer wrote:

> From the docs:
> 
> " The ØMQ library functions handle errors using the standard conventions found on POSIX systems. Generally, this means that upon failure a ØMQ library function shall return either a NULL value (if returning a pointer) or a negative value (if returning an integer), and the actual error code shall be stored in the errno variable.
> 
> 
> 
> A zmq_strerror() function is provided to translate ØMQ-specific error codes into error message strings. "
> 
> I have never worked with POSIX in the windows environment, so forgive my ignorance, but how do you reciover these error codes from langauges outside of the MS C/C++/C# environments please?
> 
> If I may suggest, wouldn't it be more usefull to have a function in the ZMQ library that you call directly to recover these error codes? Seems like most libraries offer this. In fact if you could point me in the right direction, I might write one.
> 
> I am having trouble calling zmq_init() and after four hours of reading about POSIX am no closer to recovering the error code to know why. I am running on WinXPSP3 for testing. I assume this is supported.
> 
> I probaby have made some translation error, but I am stumped when it comes to recovering the error.
> 
> 
> 
> 
> _______________________________________________
> 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: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100415/d2544c83/attachment-0001.htm 


More information about the zeromq-dev mailing list