alecthomas/gozmq — pull request #54 by jtacoma (2013-02-17 16:53:39+00:00)
Title: Retrieve errno() in a thread-safe way.

http://code.google.com/p/go/issues/detail?id=709#c3 shows how errno() can be checked in a thread-safe way with a familiar idiom.

https://zeromq.jira.com/browse/LIBZMQ-338 shows the libzmq devs aren't sure zmq_errno() should be used at all. The libzmq source as far back as v2.1.0 includes a one-line zmq_errno() implementation that only returns errno, adding nothing to errno().

I'm sure this idea is sound, but of course there may be other ways of implementing the change... for example, maybe we could just use syscall.Errno instead of zmqErrno?