From 1525f848f2670a04b3069d5ff9620a1a868a4fcd Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 18 May 2007 17:48:07 +0000 Subject: [PATCH] Catch a potential OSError if the child process has already died. svn path=/main/trunk/; revision=6550 --- pym/portage/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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] -- 2.26.2