[issue22258] Use FD_CLOEXEC in Python/fileutils.c

STINNER Victor report at bugs.python.org
Sat Aug 23 23:27:29 CEST 2014


STINNER Victor added the comment:

The patch doesn't look correct. Ioctl() reduces the overhead in term of
syscalls (1 vs 2).

What is the errno value on failure? We should remember that ioctl() doesn't
work and fallback to fcntl(). It would be more portable. Similar check is
already done for O_TMPFILE and O_CLOEXEC for example.

See the PEP 446.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22258>
_______________________________________


More information about the Python-bugs-list mailing list