From 2aa6b496519ef65c5cedc02aaaf2f3495137e6a5 Mon Sep 17 00:00:00 2001 From: Eri Bastos Date: Mon, 16 Apr 2018 12:29:09 -0300 Subject: [PATCH] Return exit code 130 when SIGINT is received --- cmd/restic/cleanup.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/restic/cleanup.go b/cmd/restic/cleanup.go index a08127b1d..728883452 100644 --- a/cmd/restic/cleanup.go +++ b/cmd/restic/cleanup.go @@ -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 }