MCPcopy Index your code
hub / github.com/coder/coder / killOnContext

Method killOnContext

pty/pty_windows.go:275–282  ·  view source on GitHub ↗

killOnContext waits for the context to be done and kills the process, unless it exits on its own first.

(ctx context.Context)

Source from the content-addressed store, hash-verified

273
274// killOnContext waits for the context to be done and kills the process, unless it exits on its own first.
275func (p *windowsProcess) killOnContext(ctx context.Context) {
276 select {
277 case <-p.cmdDone:
278 return
279 case <-ctx.Done():
280 p.Kill()
281 }
282}
283
284// winerrorFailed returns true if the syscall failed, this function
285// assumes the return value is a 32-bit integer, like HRESULT.

Callers 1

startPtyFunction · 0.95

Calls 2

KillMethod · 0.95
DoneMethod · 0.45

Tested by

no test coverage detected