summaryrefslogtreecommitdiff
path: root/libgo/go/os/exec.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/os/exec.go')
-rw-r--r--libgo/go/os/exec.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/libgo/go/os/exec.go b/libgo/go/os/exec.go
index 15e95b91722..bf3249864d3 100644
--- a/libgo/go/os/exec.go
+++ b/libgo/go/os/exec.go
@@ -6,6 +6,7 @@ package os
import (
"runtime"
+ "sync"
"sync/atomic"
"syscall"
)
@@ -13,8 +14,9 @@ import (
// Process stores the information about a process created by StartProcess.
type Process struct {
Pid int
- handle uintptr // handle is accessed atomically on Windows
- isdone uint32 // process has been successfully waited on, non zero if true
+ handle uintptr // handle is accessed atomically on Windows
+ isdone uint32 // process has been successfully waited on, non zero if true
+ sigMu sync.RWMutex // avoid race between wait and signal
}
func newProcess(pid int, handle uintptr) *Process {
@@ -41,10 +43,10 @@ type ProcAttr struct {
// new process in the form returned by Environ.
// If it is nil, the result of Environ will be used.
Env []string
- // Files specifies the open files inherited by the new process. The
+ // Files specifies the open files inherited by the new process. The
// first three entries correspond to standard input, standard output, and
- // standard error. An implementation may support additional entries,
- // depending on the underlying operating system. A nil entry corresponds
+ // standard error. An implementation may support additional entries,
+ // depending on the underlying operating system. A nil entry corresponds
// to that file being closed when the process starts.
Files []*File