From: Oleg Broytman Date: Sat, 1 Jul 2017 00:38:25 +0000 (+0300) Subject: Fix(subproc.py): Clear pid to avoid repeated killing X-Git-Tag: 5.0.0~108 X-Git-Url: https://git.phdru.name/?p=bookmarks_db.git;a=commitdiff_plain;h=3e29cb1a49f602f4a647c18ae64f0516a76de236 Fix(subproc.py): Clear pid to avoid repeated killing --- diff --git a/subproc.py b/subproc.py index 502d5dd..57a9568 100755 --- a/subproc.py +++ b/subproc.py @@ -143,7 +143,9 @@ class Subprocess: except os.error as error: errno, msg = error if errno == 10: + self.pid = None raise SubprocessError("Subprocess '%s' failed." % self.cmd) + self.pid = None raise SubprocessError("Subprocess failed[%d]: %s" % (errno, msg)) if pid == self.pid: # child exited already @@ -155,6 +157,7 @@ class Subprocess: "child killed by signal %d with a return code of %d" % (sig, rc)) if rc: + self.pid = None raise SubprocessError( "child exited with return code %d" % rc) # Child may have exited, but not in error, so we won't say