diff options
author | Russ Cox <rsc@golang.org> | 2009-06-01 22:14:39 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-06-01 22:14:39 -0700 |
commit | 9849d463b66c597d5e2429274e677030c4465484 (patch) | |
tree | 874da14a9428e632f5d373e713631be06c233e65 /src/lib/os/exec.go | |
parent | 8f6dc671ffef2fc05c938ba6dee40a0354e83bbd (diff) | |
download | golang-9849d463b66c597d5e2429274e677030c4465484.tar.gz |
update Go tree to use new syscall package.
R=r
DELTA=713 (109 added, 386 deleted, 218 changed)
OCL=29707
CL=29722
Diffstat (limited to 'src/lib/os/exec.go')
-rw-r--r-- | src/lib/os/exec.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/os/exec.go b/src/lib/os/exec.go index 9f0f01e0a..d283c7267 100644 --- a/src/lib/os/exec.go +++ b/src/lib/os/exec.go @@ -20,7 +20,7 @@ func ForkExec(argv0 string, argv []string, envv []string, dir string, fd []*File (pid int, err Error) { // Create array of integer (system) fds. - intfd := make([]int64, len(fd)); + intfd := make([]int, len(fd)); for i, f := range(fd) { if f == nil { intfd[i] = -1; @@ -64,20 +64,20 @@ const ( WNOHANG = syscall.WNOHANG; // Don't wait if no process has exited. WSTOPPED = syscall.WSTOPPED; // If set, status of stopped subprocesses is also reported. WUNTRACED = WSTOPPED; - WRUSAGE = 1<<60; // Record resource usage. + WRUSAGE = 1<<30; // Record resource usage. ) // Wait waits for process pid to exit or stop, and then returns a // Waitmsg describing its status and an Error, if any. The options // (WNOHANG etc.) affect the behavior of the Wait call. -func Wait(pid int, options uint64) (w *Waitmsg, err Error) { +func Wait(pid int, options int) (w *Waitmsg, err Error) { var status syscall.WaitStatus; var rusage *syscall.Rusage; if options & WRUSAGE != 0 { rusage = new(syscall.Rusage); options ^= WRUSAGE; } - pid1, e := syscall.Wait4(int64(pid), &status, int64(options), rusage); + pid1, e := syscall.Wait4(pid, &status, options, rusage); if e != 0 { return nil, ErrnoToError(e); } |