MCPcopy
hub / github.com/opencontainers/runc / ExitStatus

Function ExitStatus

libcontainer/utils/utils.go:18–23  ·  view source on GitHub ↗

ExitStatus returns the correct exit status for a process based on if it was signaled or exited cleanly

(status unix.WaitStatus)

Source from the content-addressed store, hash-verified

16// ExitStatus returns the correct exit status for a process based on if it
17// was signaled or exited cleanly
18func ExitStatus(status unix.WaitStatus) int {
19 if status.Signaled() {
20 return exitSignalOffset + int(status.Signal())
21 }
22 return status.ExitStatus()
23}
24
25// WriteJSON writes the provided struct v to w using standard json marshaling
26// without a trailing newline. This is used instead of json.Encoder because

Callers 3

reapMethod · 0.92
TestExitStatusFunction · 0.85
TestExitStatusSignaledFunction · 0.85

Calls 1

SignalMethod · 0.45

Tested by 2

TestExitStatusFunction · 0.68
TestExitStatusSignaledFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…