Skip to content

Commit

Permalink
Ignore interrupt signal in parent process after forking.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyseek committed Oct 11, 2014
1 parent 8888ad9 commit e97bf4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion honcho/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import os
import sys
import signal
from collections import defaultdict
from pkg_resources import iter_entry_points

Expand Down Expand Up @@ -157,7 +158,9 @@ def command_run(args):
else:
cmd = ' '.join(compat.shellquote(arg) for arg in args.argv)

p = Popen(cmd, stdout=sys.stdout, stderr=sys.stderr)
p = Popen(cmd, stdout=sys.stdout, stderr=sys.stderr,
start_new_session=False)
signal.signal(signal.SIGINT, signal.SIG_IGN)
p.wait()
sys.exit(p.returncode)

Expand Down

0 comments on commit e97bf4c

Please sign in to comment.