]> Cypherpunks repositories - gostls13.git/commitdiff
os: use signal strings where possible in ProcessState.String
authorRuss Cox <rsc@golang.org>
Thu, 31 Jan 2013 15:53:18 +0000 (07:53 -0800)
committerRuss Cox <rsc@golang.org>
Thu, 31 Jan 2013 15:53:18 +0000 (07:53 -0800)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7228067

src/pkg/os/exec_posix.go

index 2ced4d673b85219763e6152884ba584bedb00905..f7b10f3c690542da899591703e2ff16e17319928 100644 (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()) + ")"
                }