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:
parent
592b480746
commit
30985c1203
@ -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()) + ")"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user