aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/signal_ppc64x.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2016-01-01 15:44:12 -0800
committerIan Lance Taylor <iant@golang.org>2016-01-05 18:00:33 +0000
commit2c67c8c3038ec7dddecb6c1b29f0610f3262134d (patch)
tree41d176bdbe05d0e922717efc872d4fee0c035bc5 /src/runtime/signal_ppc64x.go
parent81b35117d9e0b99a5894d65c8c419541a48c87dd (diff)
downloadgo-2c67c8c3038ec7dddecb6c1b29f0610f3262134d.tar.gz
go-2c67c8c3038ec7dddecb6c1b29f0610f3262134d.zip
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_ppc64x.go')
-rw-r--r--src/runtime/signal_ppc64x.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/signal_ppc64x.go b/src/runtime/signal_ppc64x.go
index b22df88602..ee263484aa 100644
--- a/src/runtime/signal_ppc64x.go
+++ b/src/runtime/signal_ppc64x.go
@@ -122,7 +122,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 {