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

Delta Between Two Patch Sets: src/pkg/syscall/exec_unix.go

Issue 4029053: code review 4029053: os: implement new Process api (Closed)
Left Patch Set: diff -r 943ebf5f2482 https://go.googlecode.com/hg/ Created 13 years, 1 month ago
Right Patch Set: diff -r 75ebb1ad8e98 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/os/os_test.go ('k') | src/pkg/syscall/exec_windows.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 313
314 // Provide interface to ForkExec to os package. 314 // StartProcess wraps ForkExec for package os.
315 func StartProcess(argv0 string, argv []string, envv []string, dir string, fd []i nt) (pid, handle int, err int) { 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) 316 pid, err = forkExec(argv0, argv, envv, false, dir, fd)
317 return pid, 0, err 317 return pid, 0, err
318 } 318 }
LEFTRIGHT

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