Message125285
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. |
|
Date |
User |
Action |
Args |
2011-01-04 02:39:03 | gregory.p.smith | set | recipients:
+ gregory.p.smith, pitrou, jyasskin |
2011-01-04 02:39:03 | gregory.p.smith | set | messageid: <1294108743.52.0.692379749851.issue8052@psf.upfronthosting.co.za> |
2011-01-04 02:39:01 | gregory.p.smith | link | issue8052 messages |
2011-01-04 02:39:00 | gregory.p.smith | create | |
|