[ostree] mainloop: Only delete pid watch if we found the right pid
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] mainloop: Only delete pid watch if we found the right pid
- Date: Thu, 19 Jan 2012 23:33:45 +0000 (UTC)
commit 16f2f5f7e5b480c4605b7f285870b3fbd76acc40
Author: Colin Walters <walters verbum org>
Date: Thu Jan 19 18:30:45 2012 -0500
mainloop: Only delete pid watch if we found the right pid
src/ostbuild/pyostbuild/mainloop.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/mainloop.py b/src/ostbuild/pyostbuild/mainloop.py
index fb4d945..cc72fb6 100644
--- a/src/ostbuild/pyostbuild/mainloop.py
+++ b/src/ostbuild/pyostbuild/mainloop.py
@@ -69,9 +69,9 @@ class Mainloop(object):
to_delete_pids = []
for pid in self._pid_watches:
(opid, status) = os.waitpid(pid, os.WNOHANG)
- if opid != 0:
+ if opid == pid:
to_delete_pids.append(pid)
- self._pid_watches[pid](opid, status)
+ self._pid_watches[pid](pid, status)
for pid in to_delete_pids:
del self._pid_watches[pid]
newtime = time.time() * 1000
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]