diff options
-rw-r--r-- | cmd2/cmd2.py | 6 | ||||
-rw-r--r-- | cmd2/utils.py | 6 |
2 files changed, 6 insertions, 6 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 diff --git a/cmd2/utils.py b/cmd2/utils.py index 697cf6f8..7e36da92 100644 --- a/cmd2/utils.py +++ b/cmd2/utils.py @@ -404,10 +404,10 @@ class ProcReader(object): if self._proc.stderr is not None: self._err_thread.start() - def send_sigint(self) -> None: - """Send a SIGINT to the process""" + def terminate(self) -> None: + """Terminate the process""" import signal - self._proc.send_signal(signal.SIGINT) + self._proc.terminate() def wait(self) -> None: """Wait for the process to finish""" |