1
0
mirror of https://github.com/golang/go synced 2024-11-18 15:54:42 -07:00

os: use signal strings where possible in ProcessState.String

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7228067
This commit is contained in:
Russ Cox 2013-01-31 07:53:18 -08:00
parent 592b480746
commit 30985c1203

View File

@ -118,9 +118,9 @@ func (p *ProcessState) String() string {
case status.Exited():
res = "exit status " + itod(status.ExitStatus())
case status.Signaled():
res = "signal " + itod(int(status.Signal()))
res = "signal: " + status.Signal().String()
case status.Stopped():
res = "stop signal " + itod(int(status.StopSignal()))
res = "stop signal: " + status.StopSignal().String()
if status.StopSignal() == syscall.SIGTRAP && status.TrapCause() != 0 {
res += " (trap " + itod(status.TrapCause()) + ")"
}