MCPcopy Create free account
hub / github.com/UserExistsError/conpty / closeHandles

Function closeHandles

conpty.go:223–235  ·  view source on GitHub ↗

This will only return the first error.

(handles ...windows.Handle)

Source from the content-addressed store, hash-verified

221
222// This will only return the first error.
223func closeHandles(handles ...windows.Handle) error {
224 var err error
225 for _, h := range handles {
226 if h != windows.InvalidHandle {
227 if err == nil {
228 err = windows.CloseHandle(h)
229 } else {
230 windows.CloseHandle(h)
231 }
232 }
233 }
234 return err
235}
236
237// Close all open handles and terminate the process.
238func (cpty *ConPty) Close() error {

Callers 2

CloseMethod · 0.85
StartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…