Skip to content

Commit

Permalink
ulwgl_run: log keyboard interrupt
Browse files Browse the repository at this point in the history
- With the absence of Reaper or a reaper-like application, newly spawned child processes may still exists if we don't exit normally.
  • Loading branch information
R1kaB3rN committed Feb 21, 2024
1 parent e84ffc2 commit 33cd65d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ulwgl_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 33cd65d

Please sign in to comment.