Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(398)

Side by Side Diff: src/pkg/syscall/exec_unix.go

Issue 4029053: code review 4029053: os: implement new Process api (Closed)
Patch Set: diff -r 6c45f8ad74dd https://go.googlecode.com/hg/ Created 13 years, 1 month ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Fork, exec, wait, etc. 5 // Fork, exec, wait, etc.
6 6
7 package syscall 7 package syscall
8 8
9 import ( 9 import (
10 "sync" 10 "sync"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } 303 }
304 304
305 // Ordinary exec. 305 // Ordinary exec.
306 func Exec(argv0 string, argv []string, envv []string) (err int) { 306 func Exec(argv0 string, argv []string, envv []string) (err int) {
307 _, _, err1 := RawSyscall(SYS_EXECVE, 307 _, _, err1 := RawSyscall(SYS_EXECVE,
308 uintptr(unsafe.Pointer(StringBytePtr(argv0))), 308 uintptr(unsafe.Pointer(StringBytePtr(argv0))),
309 uintptr(unsafe.Pointer(&StringArrayPtr(argv)[0])), 309 uintptr(unsafe.Pointer(&StringArrayPtr(argv)[0])),
310 uintptr(unsafe.Pointer(&StringArrayPtr(envv)[0]))) 310 uintptr(unsafe.Pointer(&StringArrayPtr(envv)[0])))
311 return int(err1) 311 return int(err1)
312 } 312 }
313
314 // Provide interface to ForkExec to os package.
rsc 2011/02/03 03:31:15 // StartProcess wraps ForkExec for package os.
brainman 2011/02/04 03:11:59 Done.
315 func StartProcess(argv0 string, argv []string, envv []string, dir string, fd []i nt) (pid, handle int, err int) {
316 pid, err = forkExec(argv0, argv, envv, false, dir, fd)
317 return pid, 0, err
318 }
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b