[Tutor] O_EXLOCK ?
jb
jb at riseup.net
Mon Jan 5 22:48:01 EST 2004
On Tue, Jan 06, 2004 at 09:47:28AM +1100, Andrew McNamara wrote:
> >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
>
hi,
It hurts that O_EXLOCK and O_SHLOCK are only BSD extensions. Plan was to
use O_EXLOCK for concurrent pickling and unpickling and now i guess i'll enter
homegrown locking solutions madness.
thanks for your help and for pointing me to the standards.
later'
jb
More information about the Tutor
mailing list