MCPcopy Index your code
hub / github.com/WireGuard/wireguard-windows / Wait

Method Wait

manager/uiprocess.go:78–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76}
77
78func (p *uiProcess) Wait() (uint32, error) {
79 handle := windows.Handle(atomic.LoadUintptr(&p.handle))
80 s, err := windows.WaitForSingleObject(handle, syscall.INFINITE)
81 switch s {
82 case windows.WAIT_OBJECT_0:
83 case windows.WAIT_FAILED:
84 return 0, err
85 default:
86 return 0, errors.New("unexpected result from WaitForSingleObject")
87 }
88 var exitCode uint32
89 err = windows.GetExitCodeProcess(handle, &exitCode)
90 if err != nil {
91 return 0, err
92 }
93 p.release()
94 return exitCode, nil
95}
96
97func (p *uiProcess) Kill() error {
98 handle := windows.Handle(atomic.LoadUintptr(&p.handle))

Callers 8

ExecuteMethod · 0.95
runMsiFunction · 0.80
TestThreadsFunction · 0.80
trackServiceFunction · 0.80
runScriptCommandFunction · 0.80
UnregisterMethod · 0.80
UnregisterMethod · 0.80
UnregisterMethod · 0.80

Calls 1

releaseMethod · 0.95

Tested by 1

TestThreadsFunction · 0.64