Re: fcntl problems



In article <1188573280.155018.109360@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"mhearne808[insert-at-sign-here]gmail[insert-dot-here]com"
<mhearne808@xxxxxxxxx> 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?

On a MacOS system, you can find them in /usr/include/sys/errno.h
On a Linux system, try /usr/include/asm-generic/errno.h

However, if you're writing in Python, you will probably have an easier
time using the "errno" module, e.g.,

] import errno
] errno.errorcode[35]
'EDEADLOCK'

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.

Cheers,
-M

--
Michael J. Fromberger | Lecturer, Dept. of Computer Science
http://www.dartmouth.edu/~sting/ | Dartmouth College, Hanover, NH, USA
.



Relevant Pages

  • 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)
  • Re: fcntl problems
    ... Which system header file am I supposed to look ... playing with the interactive interpreter, ... from errno import EWOULDBLOCK ...
    (comp.lang.python)