Author gregory.p.smith
Recipients gregory.p.smith, jyasskin, pitrou
Date 2011-01-04.02:39:00
SpamBayes Score 1.93759e-08
Marked as misclassified No
Message-id <1294108743.52.0.692379749851.issue8052@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-01-04 02:39:03gregory.p.smithsetrecipients: + gregory.p.smith, pitrou, jyasskin
2011-01-04 02:39:03gregory.p.smithsetmessageid: <1294108743.52.0.692379749851.issue8052@psf.upfronthosting.co.za>
2011-01-04 02:39:01gregory.p.smithlinkissue8052 messages
2011-01-04 02:39:00gregory.p.smithcreate