Re: fcntl problems



On 8/31/07, mhearne808 wrote:
Looking at my flock(3) man page, I'm guessing that "35" is the error
code for EWOULDBLOCK. Which system header file am I supposed to look
in to figure that magic number out?

I got the error number by looking at the IOError exception raised when
playing with the interactive interpreter, but I really should have
written:

from errno import EWOULDBLOCK
....
if e.args[0] == EWOULDBLOCK:
....

- Miles
.



Relevant Pages

  • Re: fcntl problems
    ... Which system header file am I supposed to look ... time using the "errno" module, e.g., ... Note that some codes have multiple names (e.g., EAGAIN and EWOULDBLOCK) ... so that this lookup may not return exactly the name you're expecting. ...
    (comp.lang.python)
  • Re: Using too many threads?
    ... It took some hunting to figure out that the timeval ... is available errno will be set to EWOULDBLOCK. ... Even more reason to have a robust line assembly routine. ...
    (comp.os.os2.programmer.misc)