[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

Steven Stewart-Gallus report at bugs.python.org
Sun Jun 1 04:29:05 CEST 2014


Steven Stewart-Gallus added the comment:

I found another problem with _close_open_fd_range_safe. POSIX leaves
the state of a file descriptor given to close undefined if the close
fails with EINTR. I believe but haven't double checked that close
should not be retried on EINTR on all of our supported platforms. If
you must have absolute portability, block all signals so that close
can't fail with EINTR and then unblock them after close. This isn't an
actual problem because the code will just close an extra time but it's
still bothersome.

----------

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


More information about the Python-bugs-list mailing list