MCPcopy Index your code
hub / github.com/kubernetes/node-problem-detector / Exec

Function Exec

pkg/util/exec_unix.go:29–37  ·  view source on GitHub ↗

Exec creates a new process with the specified arguments.

(ctx context.Context, name string, arg ...string)

Source from the content-addressed store, hash-verified

27
28// Exec creates a new process with the specified arguments.
29func Exec(ctx context.Context, name string, arg ...string) *exec.Cmd {
30 // create a process group
31 sysProcAttr := &syscall.SysProcAttr{
32 Setpgid: true,
33 }
34 cmd := exec.CommandContext(ctx, name, arg...)
35 cmd.SysProcAttr = sysProcAttr
36 return cmd
37}
38
39// Kill the process and subprocesses.
40func Kill(cmd *exec.Cmd) error {

Callers 2

runMethod · 0.92
TestExecFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestExecFunction · 0.56