2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-29 16:23:59 +00:00

Return exit code 130 when SIGINT is received

This commit is contained in:
Eri Bastos 2018-04-16 12:29:09 -03:00 committed by Alexander Neumann
parent 7877797c7e
commit 2aa6b49651

View File

@ -64,7 +64,10 @@ func CleanupHandler(c <-chan os.Signal) {
fmt.Fprintf(stderr, "%ssignal %v received, cleaning up\n", ClearLine(), s) fmt.Fprintf(stderr, "%ssignal %v received, cleaning up\n", ClearLine(), s)
code := 0 code := 0
if s != syscall.SIGINT {
if s == syscall.SIGINT {
code = 130
} else {
code = 1 code = 1
} }