fcntl problems

Michael J. Fromberger Michael.J.Fromberger at Clothing.Dartmouth.EDU
Fri Aug 31 20:25:01 CEST 2007


In article <1188573280.155018.109360 at o80g2000hse.googlegroups.com>,
 "mhearne808[insert-at-sign-here]gmail[insert-dot-here]com" 
 <mhearne808 at gmail.com> 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



More information about the Python-list mailing list