Skip to content

Commit

Permalink
report signal termination on SIGINT by killing itself
Browse files Browse the repository at this point in the history
  • Loading branch information
MestreLion committed Jul 20, 2022
1 parent a42654d commit 5d45916
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions git-restore-mtime
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import datetime
import logging
import os.path
import shlex
import signal
import subprocess
import sys
import time
Expand Down Expand Up @@ -568,5 +569,6 @@ if args.test:
try:
sys.exit(main())
except KeyboardInterrupt:
log.info("Aborting")
sys.exit(-1)
log.info("\nAborting")
signal.signal(signal.SIGINT, signal.SIG_DFL)
os.kill(os.getpid(), signal.SIGINT)

0 comments on commit 5d45916

Please sign in to comment.