Stop is part of the Cmd interface.
()
| 123 | |
| 124 | // Stop is part of the Cmd interface. |
| 125 | func (cmd *cmdWrapper) Stop() { |
| 126 | c := (*osexec.Cmd)(cmd) |
| 127 | |
| 128 | if c.Process == nil { |
| 129 | return |
| 130 | } |
| 131 | |
| 132 | _ = c.Process.Signal(syscall.SIGTERM) |
| 133 | |
| 134 | time.AfterFunc(10*time.Second, func() { |
| 135 | if !c.ProcessState.Exited() { |
| 136 | _ = c.Process.Signal(syscall.SIGKILL) |
| 137 | } |
| 138 | }) |
| 139 | } |
| 140 | |
| 141 | func handleError(err error) error { |
| 142 | if err == nil { |
no outgoing calls
no test coverage detected