aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/os/exec_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/os/exec_windows.go')
-rw-r--r--libgo/go/os/exec_windows.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgo/go/os/exec_windows.go b/libgo/go/os/exec_windows.go
index c4c9dcf..7eb7d19 100644
--- a/libgo/go/os/exec_windows.go
+++ b/libgo/go/os/exec_windows.go
@@ -11,6 +11,8 @@ import (
"unsafe"
)
+// Wait waits for the Process to exit or stop, and then returns a
+// Waitmsg describing its status and an error, if any.
func (p *Process) Wait(options int) (w *Waitmsg, err error) {
s, e := syscall.WaitForSingleObject(syscall.Handle(p.handle), syscall.INFINITE)
switch s {
@@ -43,6 +45,7 @@ func (p *Process) Signal(sig Signal) error {
return syscall.Errno(syscall.EWINDOWS)
}
+// Release releases any resources associated with the Process.
func (p *Process) Release() error {
if p.handle == -1 {
return EINVAL
@@ -57,7 +60,7 @@ func (p *Process) Release() error {
return nil
}
-func FindProcess(pid int) (p *Process, err error) {
+func findProcess(pid int) (p *Process, err error) {
const da = syscall.STANDARD_RIGHTS_READ |
syscall.PROCESS_QUERY_INFORMATION | syscall.SYNCHRONIZE
h, e := syscall.OpenProcess(da, false, uint32(pid))