handleExit handles the exit(2) syscall.
(n *seccomp.Notif, code int)
| 25 | |
| 26 | // handleExit handles the exit(2) syscall. |
| 27 | func (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. |
| 40 | func (p *Process) handleExitGroup(n *seccomp.Notif, code int) error { |
no test coverage detected