MCPcopy Index your code
hub / github.com/coder/envbox / Stop

Method Stop

xunix/exec.go:125–139  ·  view source on GitHub ↗

Stop is part of the Cmd interface.

()

Source from the content-addressed store, hash-verified

123
124// Stop is part of the Cmd interface.
125func (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
141func handleError(err error) error {
142 if err == nil {

Callers 3

killMethod · 0.80
WaitForDaemonFunction · 0.80
WaitForManagerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected