feat: properly handle SIGINT (ctrl-c) in BEC GUI server -> calls qapplication.quit()

This commit is contained in:
2024-06-17 17:46:00 +02:00
committed by wyzula_j
parent d1266a1ce1
commit 3644f344da
2 changed files with 14 additions and 1 deletions
+6 -1
View File
@@ -93,7 +93,12 @@ def _start_plot_process(gui_id, gui_class, config) -> None:
env_dict = os.environ.copy()
env_dict["PYTHONUNBUFFERED"] = "1"
process = subprocess.Popen(
command, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env_dict
command,
text=True,
start_new_session=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=env_dict,
)
process_output_processing_thread = threading.Thread(target=_get_output, args=(process,))
process_output_processing_thread.start()