diff options
author | Ian Lance Taylor <iant@golang.org> | 2016-01-01 15:44:12 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2016-01-05 18:00:33 +0000 |
commit | 2c67c8c3038ec7dddecb6c1b29f0610f3262134d (patch) | |
tree | 41d176bdbe05d0e922717efc872d4fee0c035bc5 /src/runtime/signal_mips64x.go | |
parent | 81b35117d9e0b99a5894d65c8c419541a48c87dd (diff) | |
download | go-git-2c67c8c3038ec7dddecb6c1b29f0610f3262134d.tar.gz |
runtime: fix exit status when killed by signal
Previously, when a program died because of a SIGHUP, SIGINT, or SIGTERM
signal it would exit with status 2. This CL fixes the runtime to exit
with a status indicating that the program was killed by a signal.
Change-Id: Ic2982a2562857edfdccaf68856e0e4df532af136
Reviewed-on: https://go-review.googlesource.com/18156
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/signal_mips64x.go')
-rw-r--r-- | src/runtime/signal_mips64x.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/signal_mips64x.go b/src/runtime/signal_mips64x.go index f30ff6e9e9..868e993104 100644 --- a/src/runtime/signal_mips64x.go +++ b/src/runtime/signal_mips64x.go @@ -118,7 +118,7 @@ func sighandler(sig uint32, info *siginfo, ctxt unsafe.Pointer, gp *g) { } if flags&_SigKill != 0 { - exit(2) + dieFromSignal(int32(sig)) } if flags&_SigThrow == 0 { |