diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-05-18 17:48:07 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-05-18 17:48:07 +0000 |
commit | 1525f848f2670a04b3069d5ff9620a1a868a4fcd (patch) | |
tree | 24601d5ee1523f00af36227b38571524f0124f15 | |
parent | 17ec89826506ce2bcfa69c4853754d12efdcdff8 (diff) | |
download | portage-1525f848f2670a04b3069d5ff9620a1a868a4fcd.tar.gz portage-1525f848f2670a04b3069d5ff9620a1a868a4fcd.tar.bz2 portage-1525f848f2670a04b3069d5ff9620a1a868a4fcd.zip |
Catch a potential OSError if the child process has already died.
svn path=/main/trunk/; revision=6550
-rw-r--r-- | pym/portage/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 9b9fbdcb6..f58438158 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -2341,7 +2341,10 @@ def spawn(mystring, mysettings, debug=0, free=0, droppriv=0, sesandbox=0, **keyw if input_pid: # cat is blocking on stdin, so it must be killed. import signal - os.kill(input_pid, signal.SIGTERM) + try: + os.kill(input_pid, signal.SIGTERM) + except OSError: + pass # it died by itself os.waitpid(input_pid, 0) portage.process.spawned_pids.remove(input_pid) pid = mypids[-1] |