mirror of
https://github.com/restic/restic.git
synced 2026-10-16 22:48:12 +00:00
Return exit code 130 when SIGINT is received
This commit is contained in:
1 parent
7877797c7e
commit
2aa6b49651
1 file changed
+4
-1
@@ -64,7 +64,10 @@ func CleanupHandler(c <-chan os.Signal) {
|
||||
fmt.Fprintf(stderr, "%ssignal %v received, cleaning up\n", ClearLine(), s)
|
||||
|
||||
code := 0
|
||||
if s != syscall.SIGINT {
|
||||
|
||||
if s == syscall.SIGINT {
|
||||
code = 130
|
||||
} else {
|
||||
code = 1
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user