Merge 3.5: fcntl doc

This commit is contained in:
Victor Stinner 2016-04-09 11:33:53 +02:00
commit 1edcd50b5d
2 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ The module defines the following functions:
buffer 1024 bytes long which is then passed to :func:`ioctl` and copied back buffer 1024 bytes long which is then passed to :func:`ioctl` and copied back
into the supplied buffer. into the supplied buffer.
If the :c:func:`ioctl` fails, an :exc:`IOError` exception is raised. If the :c:func:`ioctl` fails, an :exc:`OSError` exception is raised.
An example:: An example::
@ -106,7 +106,7 @@ The module defines the following functions:
:manpage:`flock(2)` for details. (On some systems, this function is emulated :manpage:`flock(2)` for details. (On some systems, this function is emulated
using :c:func:`fcntl`.) using :c:func:`fcntl`.)
If the :c:func:`flock` fails, an :exc:`IOError` exception is raised. If the :c:func:`flock` fails, an :exc:`OSError` exception is raised.
.. function:: lockf(fd, cmd, len=0, start=0, whence=0) .. function:: lockf(fd, cmd, len=0, start=0, whence=0)

View File

@ -344,7 +344,7 @@ of the following values:
When operation is LOCK_SH or LOCK_EX, it can also be bitwise ORed with When operation is LOCK_SH or LOCK_EX, it can also be bitwise ORed with
LOCK_NB to avoid blocking on lock acquisition. If LOCK_NB is used and the LOCK_NB to avoid blocking on lock acquisition. If LOCK_NB is used and the
lock cannot be acquired, an IOError will be raised and the exception will lock cannot be acquired, an OSError will be raised and the exception will
have an errno attribute set to EACCES or EAGAIN (depending on the operating have an errno attribute set to EACCES or EAGAIN (depending on the operating
system -- for portability, check for either value). system -- for portability, check for either value).