[issue5179] subprocess leaves open fds on construction error

2009-03-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Thanks, fixed in r70137(trunk), r70142(py3k), r70146(release30-maint), r70147(release26-maint) -- priority: release blocker -> high resolution: -> fixed status: open -> closed ___ Python tracker

[issue5179] subprocess leaves open fds on construction error

2009-03-03 Thread Georg Brandl
Georg Brandl added the comment: Since I can't test on Windows, I'll leave that in your hands :) ___ Python tracker ___ ___ Python-bugs-list mai

[issue5179] subprocess leaves open fds on construction error

2009-03-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This issue is not fixed on windows yet. (test_leaking_fds_on_error fails) I think attached patch will fix this. == ERROR: test_writes_before_communicate (__main__.ProcessTestCase) --

[issue5179] subprocess leaves open fds on construction error

2009-02-14 Thread Georg Brandl
Georg Brandl added the comment: OK, Windows has 2048. Added test and fixed in r69620. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue5179] subprocess leaves open fds on construction error

2009-02-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Wow, the Roundup email gateway borks code snippets: >>> import resource >>> resource.getrlimit(resource.RLIMIT_NOFILE) (1024, 1024) ___ Python tracker _

[issue5179] subprocess leaves open fds on construction error

2009-02-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Hmm, is there a way to get the current number of open file descriptors? Under Unix, you can use resource.getrlimit(): (1024, 1024) But 1024 is a very common value, so you could simply loop 1024 times if it's not too slow. Besides, you definitely don't want

[issue5179] subprocess leaves open fds on construction error

2009-02-14 Thread Georg Brandl
Georg Brandl added the comment: On second thought, if the patch is applied, there *shouldn't* be an exception. And simply running the loop for a fixed number of repetitions isn't a good test either, since different platforms may have a different maximum for open file descriptors. Hmm, is there

[issue5179] subprocess leaves open fds on construction error

2009-02-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, I'm not under Windows. I'll try to launch a VM if nobody beats me to it... ___ Python tracker ___ ___ P

[issue5179] subprocess leaves open fds on construction error

2009-02-14 Thread Georg Brandl
Georg Brandl added the comment: I would, but how this fails is likely to be highly platform-specific. Can you try it on Windows and tell me what the resulting exception is? ___ Python tracker __

[issue5179] subprocess leaves open fds on construction error

2009-02-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps you could add a test? -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue5179] subprocess leaves open fds on construction error

2009-02-07 Thread Georg Brandl
Georg Brandl added the comment: Proposed patch attached. Added file: http://bugs.python.org/file12972/sp-patch.py ___ Python tracker ___ ___ P

[issue5179] subprocess leaves open fds on construction error

2009-02-07 Thread Georg Brandl
New submission from Georg Brandl : The test case below will (on Linux here) eventually quit with "OSError: [Errno 24] Too many open files". I assume that some additional cleaning up is in order. --- from subprocess import Popen, P