1
0
mirror of https://github.com/golang/go synced 2024-11-21 20:14:52 -07:00

os: point readers at the exec package

R=golang-dev, evan, rsc
CC=golang-dev
https://golang.org/cl/4802046
This commit is contained in:
Brad Fitzpatrick 2011-07-20 11:38:18 -07:00
parent 102b5b34a7
commit bf768294ed

View File

@ -21,6 +21,9 @@ func (sig UnixSignal) String() string {
// StartProcess starts a new process with the program, arguments and attributes
// specified by name, argv and attr.
//
// StartProcess is a low-level interface. The exec package provides
// higher-level interfaces.
func StartProcess(name string, argv []string, attr *ProcAttr) (p *Process, err Error) {
sysattr := &syscall.ProcAttr{
Dir: attr.Dir,
@ -49,7 +52,9 @@ func (p *Process) Kill() Error {
// Exec replaces the current process with an execution of the
// named binary, with arguments argv and environment envv.
// If successful, Exec never returns. If it fails, it returns an Error.
// StartProcess is almost always a better way to execute a program.
//
// To run a child process, see StartProcess (for a low-level interface)
// or the exec package (for higher-level interfaces).
func Exec(name string, argv []string, envv []string) Error {
if envv == nil {
envv = Environ()