Gregory P. Smith <[email protected]> added the comment:
its still a problem, even the C path has to call close() a million times in
that case. thats a huge number of wasted syscalls. fixing this is blocking on
a good way to get the list of open fds.
I have seen other subprocess code do it using the race condition method of
having the parent process get the list from os.listdir('/prod/self/fds') but
that isn't guaranteed to get everything due to the race and we I don't believe
we have enough posix async signal safe syscalls to do that in between the
fork+exec.
I heard talk of actual system calls to do this type of thing (getting a list of
a processes open fds) being added to future Linux kernels but I have not
followed up on that to see if any have or if they are what we need.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue8052>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com