MCPcopy Index your code
hub / github.com/subtrace/subtrace / handleExit

Method handleExit

cmd/run/engine/process/handle.go:27–37  ·  view source on GitHub ↗

handleExit handles the exit(2) syscall.

(n *seccomp.Notif, code int)

Source from the content-addressed store, hash-verified

25
26// handleExit handles the exit(2) syscall.
27func (p *Process) handleExit(n *seccomp.Notif, code int) error {
28 if n.PID != p.PID { // we only care about the main thread exiting
29 return n.Skip()
30 }
31
32 slog.Debug("process main thread is exiting", "proc", p, "code", code)
33 if p.markAsExited() {
34 go p.cleanup()
35 }
36 return n.Skip()
37}
38
39// handleExitGroup handles the exit_group(2) syscall.
40func (p *Process) handleExitGroup(n *seccomp.Notif, code int) error {

Callers 1

initFunction · 0.80

Calls 3

markAsExitedMethod · 0.95
cleanupMethod · 0.95
SkipMethod · 0.80

Tested by

no test coverage detected