diff --git a/pipelinewise/cli/pipelinewise.py b/pipelinewise/cli/pipelinewise.py index 6410106f1..96c4c40eb 100644 --- a/pipelinewise/cli/pipelinewise.py +++ b/pipelinewise/cli/pipelinewise.py @@ -1356,6 +1356,12 @@ def stop_tap(self, sig=None, frame=None): if os.path.isfile(tap_run_log_file_running): os.rename(tap_run_log_file_running, tap_run_log_file_terminated) + # Remove pidfile. + try: + os.remove(pidfile_path) + except Exception: + pass + sys.exit(1) # pylint: disable=too-many-locals