Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
bf768294
Commit
bf768294
authored
Jul 20, 2011
by
Brad Fitzpatrick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os: point readers at the exec package
R=golang-dev, evan, rsc CC=golang-dev
https://golang.org/cl/4802046
parent
102b5b34
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
exec_posix.go
src/pkg/os/exec_posix.go
+6
-1
No files found.
src/pkg/os/exec_posix.go
View file @
bf768294
...
@@ -21,6 +21,9 @@ func (sig UnixSignal) String() string {
...
@@ -21,6 +21,9 @@ func (sig UnixSignal) String() string {
// StartProcess starts a new process with the program, arguments and attributes
// StartProcess starts a new process with the program, arguments and attributes
// specified by name, argv and attr.
// 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
)
{
func
StartProcess
(
name
string
,
argv
[]
string
,
attr
*
ProcAttr
)
(
p
*
Process
,
err
Error
)
{
sysattr
:=
&
syscall
.
ProcAttr
{
sysattr
:=
&
syscall
.
ProcAttr
{
Dir
:
attr
.
Dir
,
Dir
:
attr
.
Dir
,
...
@@ -49,7 +52,9 @@ func (p *Process) Kill() Error {
...
@@ -49,7 +52,9 @@ func (p *Process) Kill() Error {
// Exec replaces the current process with an execution of the
// Exec replaces the current process with an execution of the
// named binary, with arguments argv and environment envv.
// named binary, with arguments argv and environment envv.
// If successful, Exec never returns. If it fails, it returns an Error.
// 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
{
func
Exec
(
name
string
,
argv
[]
string
,
envv
[]
string
)
Error
{
if
envv
==
nil
{
if
envv
==
nil
{
envv
=
Environ
()
envv
=
Environ
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment