[ARVADOS] created: 3f5b70e78c4008e0de876e53fc7fbbc0671a6937
git at public.curoverse.com
git at public.curoverse.com
Tue Feb 9 11:41:20 EST 2016
at 3f5b70e78c4008e0de876e53fc7fbbc0671a6937 (commit)
commit 3f5b70e78c4008e0de876e53fc7fbbc0671a6937
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Feb 9 11:41:13 2016 -0500
8404: catch and continue from interrupted system call from os.wait()
diff --git a/crunch_scripts/run-command b/crunch_scripts/run-command
index a6c5ef9..266a12d 100755
--- a/crunch_scripts/run-command
+++ b/crunch_scripts/run-command
@@ -397,12 +397,18 @@ try:
active = 1
pids = set([s.pid for s in subprocesses])
while len(pids) > 0:
- (pid, status) = os.wait()
- pids.discard(pid)
- if not taskp.get("task.ignore_rcode"):
- rcode[pid] = (status >> 8)
- else:
- rcode[pid] = 0
+ try:
+ (pid, status) = os.wait()
+ pids.discard(pid)
+ if not taskp.get("task.ignore_rcode"):
+ rcode[pid] = (status >> 8)
+ else:
+ rcode[pid] = 0
+ except OSError as e:
+ if e.errno == errno.EINTR:
+ pass
+ else:
+ raise
if sig.sig is not None:
logger.critical("terminating on signal %s" % sig.sig)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list