From 33cd65de0a9770601af70974735ccb1e3a2c88ed Mon Sep 17 00:00:00 2001 From: R1kaB3rN <100738684+R1kaB3rN@users.noreply.github.com> Date: Tue, 20 Feb 2024 21:11:52 -0800 Subject: [PATCH] ulwgl_run: log keyboard interrupt - With the absence of Reaper or a reaper-like application, newly spawned child processes may still exists if we don't exit normally. --- ulwgl_run.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ulwgl_run.py b/ulwgl_run.py index b178790b..72bb95f6 100755 --- a/ulwgl_run.py +++ b/ulwgl_run.py @@ -387,6 +387,12 @@ def main() -> int: # noqa: D103 if __name__ == "__main__": try: sys.exit(main()) + except KeyboardInterrupt: + # Until Reaper is part of the command sequence, spawned process may still be alive afterwards + log.warning( + msg("KeyboardInterrupt\nChild processes may still exists", Level.WARNING) + ) + sys.exit(1) except Exception as e: # noqa: BLE001 print_exception(e) sys.exit(1)