diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-20 21:26:33 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-03-20 21:26:33 -0400 |
commit | 99f98ff1280f56092f25952ca8e24cff52c09aef (patch) | |
tree | ce9d9adcd4ed245be7276f80487e6f613b9ad1b3 /cmd2/cmd2.py | |
parent | fb9fe3681be570455590e09cc8a4a9ff0e4821c2 (diff) | |
download | cmd2-git-99f98ff1280f56092f25952ca8e24cff52c09aef.tar.gz |
Terminate pipe processes instead of sending them SIGINTs
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 1226bc59..ae47fb4f 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -1655,8 +1655,8 @@ class Cmd(cmd.Cmd): :param frame """ try: - # Forward the sigint to the current pipe process - self.pipe_proc_reader.send_sigint() + # Terminate the current pipe process + self.pipe_proc_reader.terminate() except AttributeError: # Ignore since self.pipe_proc_reader was None pass @@ -1920,7 +1920,7 @@ class Cmd(cmd.Cmd): # We want Popen to raise an exception if it fails to open the process. Thus we don't set shell to True. try: # Set options to not forward signals to the pipe process. If a Ctrl-C event occurs, - # our sigint handler will forward it to the most recent pipe process. This makes sure + # our sigint handler terminate the most recent pipe process. This makes sure # pipe processes close in the right order (most recent first). if sys.platform == 'win32': creationflags = subprocess.CREATE_NEW_PROCESS_GROUP |