def __init__(self):
self.sig = None
- def send_signal(self, sp, signum, sig):
+ def send_signal(self, sp, signum):
sp.send_signal(signum)
self.sig = signum
# wait for process to complete.
rcode = sp.wait()
- print("sig is %s" % sig.sig)
-
- if len(sig) > 0:
- print("run-command: terminating on signal %s" % sig[0])
+ if sig.sig != None:
+ print("run-command: terminating on signal %s" % sig.sig)
sys.exit(rcode)
else:
print("run-command: completed with exit code %i (%s)" % (rcode, "success" if rcode == 0 else "failed"))