MCPcopy
hub / github.com/kubernetes/node-problem-detector / Kill

Function Kill

pkg/util/exec_unix.go:40–45  ·  view source on GitHub ↗

Kill the process and subprocesses.

(cmd *exec.Cmd)

Source from the content-addressed store, hash-verified

38
39// Kill the process and subprocesses.
40func Kill(cmd *exec.Cmd) error {
41 if cmd.Process == nil {
42 return fmt.Errorf("%v does not have a process handle", cmd)
43 }
44 return syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
45}

Callers 2

runMethod · 0.92
TestExecFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestExecFunction · 0.56