PEP 433: specify behaviour of old Linux kernels with SOCK_CLOEXEC

This commit is contained in:
Victor Stinner 2013-01-26 01:22:05 +01:00
parent c4b34e2827
commit 5bbeffbeb0
1 changed files with 4 additions and 3 deletions

View File

@ -647,8 +647,9 @@ On Linux older than 2.6.23, ``O_CLOEXEC`` flag is simply ignored. So
we have to check that the flag is supported by calling ``fcntl()``. If
it does not work, we have to set the flag using ``fcntl()``.
XXX what is the behaviour on Linux older than 2.6.27
XXX with SOCK_CLOEXEC? XXX
On Linux older than 2.6.27, if the ``SOCK_CLOEXEC`` flag is set in the
socket type, ``socket()`` or ``socketpair()`` fail and ``errno`` is set
to ``EINVAL``.
New functions:
@ -657,7 +658,7 @@ New functions:
* ``accept4()``: available on Linux 2.6.28+ (and glibc 2.10)
If ``accept4()`` is called on Linux older than 2.6.28, ``accept4()``
returns ``-1`` (fail) and errno is set to ``ENOSYS``.
returns ``-1`` (fail) and ``errno`` is set to ``ENOSYS``.
Links