[issue5673] Add timeout option to subprocess.Popen
Pablo Bitton added the comment: Has anybody had a chance to look into the problem I encountered yet? Do you need more information? -- ___ Python tracker <http://bugs.python.org/issue5673> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
Pablo Bitton added the comment: Has anybody had a chance to look into the problem I encountered yet? Do you need more information? -- ___ Python tracker <http://bugs.python.org/issue5673> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
Pablo Bitton added the comment: I reproduced the problem with the latest patch, subprocess-timeout-py3k-v7.patch, on py3k on Linux. Attached is the code to reproduce the problem and the resulting traceback. -- Added file: http://bugs.python.org/file18468/tcpdump error.txt ___ Python tracker <http://bugs.python.org/issue5673> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
Pablo Bitton added the comment: I've been using the subprocess-timeout-v5.patch patch with 2.x. Isn't that version supposed to work with 2.x? Other than the stated problem, the patched module generally works, and is very helpful. -- ___ Python tracker <http://bugs.python.org/issue5673> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
Pablo Bitton added the comment: I'd like to report a problem I encountered with the discussed use pattern using subprocess-timeout-v5.patch on linux. I don't have python3 installed at work, sorry. When running: p = subprocess.Popen("tcpdump -i eth0 > file &", stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, universal_newlines=True) try: out, err = p.communicate(timeout=1) except subprocess.TimeoutExpired: p.kill() out, err = p.communicate() After the timeout happens, the last line raises a ValueError: I/O operation on closed file. The exception is thrown from the register_and_append call for self.stdout in _communicate_with_poll. I'm sorry again for not being able to attach the full traceback. The problem doesn't reproduce without the '&' or the '> file', and doesn't reproduce with other executables I've tried. -- ___ Python tracker <http://bugs.python.org/issue5673> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
Changes by Pablo Bitton : -- nosy: +Pablo.Bitton ___ Python tracker <http://bugs.python.org/issue5673> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com