projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
11167: Reverted deletion of integration test. Modified it so it
[arvados.git]
/
crunch_scripts
/
run-command
diff --git
a/crunch_scripts/run-command
b/crunch_scripts/run-command
index a6c5ef981ce35fb5e52f8bab9c6628c803e45872..3fd08bf28b714cbab425c7fa7cb404946c104133 100755
(executable)
--- a/
crunch_scripts/run-command
+++ b/
crunch_scripts/run-command
@@
-1,4
+1,7
@@
#!/usr/bin/env python
#!/usr/bin/env python
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
import logging
import logging
@@
-397,12
+400,19
@@
try:
active = 1
pids = set([s.pid for s in subprocesses])
while len(pids) > 0:
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)
+ try:
+ (pid, status) = os.wait()
+ except OSError as e:
+ if e.errno == errno.EINTR:
+ pass
+ else:
+ raise
else:
else:
- rcode[pid] = 0
+ pids.discard(pid)
+ if not taskp.get("task.ignore_rcode"):
+ rcode[pid] = (status >> 8)
+ else:
+ rcode[pid] = 0
if sig.sig is not None:
logger.critical("terminating on signal %s" % sig.sig)
if sig.sig is not None:
logger.critical("terminating on signal %s" % sig.sig)