[Python-Dev] Inconsistent behaviour of methods waiting for child process
Hi, I've previously asked about this issue on Python General but there was no response and I hope this post qualifies for Python Devel. I've done some experiments with: 1) multiprocessing.Process.join() 2) os.waitpid() 3) subprocess.Popen.wait() These three methods behave completely different when interrupted with a signal which I find disturbing. Reactions are: 1) exit with no exception or special return code 2) OSError exception 3) quiet retry (no exit) The 1) case is very impractical. Is there any movement towards standardization of those 3? Am I missing something and there is a way to get more information from Process.join()? My environment is: $ python --version Python 2.7.3rc2 $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description:Debian GNU/Linux 7.0 (wheezy) Release:7.0 Codename: wheezy $ uname -a Linux magazyn-ziarno 3.2.0-4-686-pae #1 SMP Debian 3.2.35-2 i686 GNU/Linux -- Marcin Szewczyk http://wodny.org mailto:[email protected] <- remove b / usuĊ b xmpp:[email protected] xmpp:[email protected] ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Inconsistent behaviour of methods waiting for child process
On 22/01/2013 12:16pm, Marcin Szewczyk wrote: The 1) case is very impractical. Is there any movement towards standardization of those 3? Am I missing something and there is a way to get more information from Process.join()? With Process.join(), it looks like version 2.6 raises OSError but later versions do not. Could you file an issue at bugs.python.org? You can work around the problem by checking the exitcode attribute, e.g. while proc.exitcode is None: proc.join() -- Richard ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] hg.python.org Mercurial upgrade
Hello, I've upgraded the Mercurial version on hg.python.org. If there any problems, don't hesitate to post here. (apart from the connectivity problems we seem to have from time to time and which shouldn't be related) Regards Antoine. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] slightly misleading Popen.poll() docs
On 05/12/2012 17:15, Steven D'Aprano wrote: """ Check if child process has terminated. Returns None while the child is still running, any non-None value means that the child has terminated. In either case, the return value is also available from the instance's returncode attribute. """ Do you want to make the commit or shall I? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
