[Python-Dev] Inconsistent behaviour of methods waiting for child process

Marcin Szewczyk marcin.szewczyk at wodny.org
Tue Jan 22 13:16:52 CET 2013


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:Marcin.Szewczyk at wodny.borg  <- remove b / usuń b
xmpp:wodny at ubuntu.pl                  xmpp:wodny at jabster.pl


More information about the Python-Dev mailing list