The code henceforth is copied straight and modified slightly from "k8s.io/utils/exec". Their interface doesn't allow for a reference to exec.Cmd.Process which we use to kill and wait for a process to exit.
| 35 | // exec.Cmd.Process which we use to kill and wait for a process to exit. |
| 36 | |
| 37 | type Execer interface { |
| 38 | // CommandContext returns a Cmd instance which can be used to run a single command. |
| 39 | // |
| 40 | // The provided context is used to kill the process if the context becomes done |
| 41 | // before the command completes on its own. For example, a timeout can be set in |
| 42 | // the context. |
| 43 | CommandContext(ctx context.Context, cmd string, args ...string) Cmd |
| 44 | } |
| 45 | |
| 46 | type Cmd interface { |
| 47 | utilexec.Cmd |
no outgoing calls
no test coverage detected