blast: minor cleanups
This commit is contained in:
parent
eabd113262
commit
7513811111
|
@ -30,8 +30,10 @@ def set_pdeathsig(sig=signal.SIGTERM):
|
||||||
|
|
||||||
MY_PID = None
|
MY_PID = None
|
||||||
|
|
||||||
def reap_children(*args, **kwargs):
|
def reap_children(sig=None, frame=None):
|
||||||
global MY_PID
|
global MY_PID
|
||||||
|
# reset SIGTERM handler to avoid recursing
|
||||||
|
signal.signal(signal.SIGTERM, signal.Handlers.SIG_DFL)
|
||||||
logger.info("killing all children (of pid %d)", MY_PID)
|
logger.info("killing all children (of pid %d)", MY_PID)
|
||||||
os.killpg(MY_PID, signal.SIGTERM)
|
os.killpg(MY_PID, signal.SIGTERM)
|
||||||
|
|
||||||
|
@ -94,8 +96,8 @@ class BlastDriver:
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.PIPE,
|
||||||
# TODO: is this pdeathsig necessary? probably not.
|
# this pdeathsig isn't necessary; seems it might result in leaked pulse outputs
|
||||||
preexec_fn=set_pdeathsig
|
# preexec_fn=set_pdeathsig
|
||||||
)
|
)
|
||||||
self.blast_flags = list(blast_flags)
|
self.blast_flags = list(blast_flags)
|
||||||
self.receiver_names = []
|
self.receiver_names = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user