[Tutor] O_EXLOCK ?

Andrew McNamara andrewm at object-craft.com.au
Mon Jan 5 17:47:28 EST 2004


>i'm with Python 2.3.3 on a openbsd.
>
>i'm looking everywhere (or at least in all the wrong places) and i can't find
>a O_EXLOCK as in open(2), grepped the sources, etc.  This seems especially 
>weird since fcntl doc says there's more about locking in os.open.
>
>can anyone tell me where is this O_EXLOCK ?  am i missing something ?

All the common O_ symbols are defined in the "os" module, but O_EXLOCK
is not standard (not part of the Single Unix spec [1]) - it's a BSD
extension. That's not to say it couldn't be added to "os" at a future
time, but that won't help you in the short term. There is, however, a
"posixfile" module that may do what you need.

 [1] http://www.opengroup.org/onlinepubs/007908799/xsh/open.html

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Tutor mailing list