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
7aba72ba
Commit
7aba72ba
authored
Feb 29, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os: diagnose chdir error during StartProcess
R=golang-dev, bradfitz CC=golang-dev
https://golang.org/cl/5711044
parent
b47cef39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
exec_posix.go
src/pkg/os/exec_posix.go
+10
-0
No files found.
src/pkg/os/exec_posix.go
View file @
7aba72ba
...
...
@@ -18,6 +18,16 @@ import (
//
// If there is an error, it will be of type *PathError.
func
StartProcess
(
name
string
,
argv
[]
string
,
attr
*
ProcAttr
)
(
p
*
Process
,
err
error
)
{
// Double-check existence of the directory we want
// to chdir into. We can make the error clearer this way.
if
attr
!=
nil
&&
attr
.
Dir
!=
""
{
if
_
,
err
:=
Stat
(
attr
.
Dir
);
err
!=
nil
{
pe
:=
err
.
(
*
PathError
)
pe
.
Op
=
"chdir"
return
nil
,
pe
}
}
sysattr
:=
&
syscall
.
ProcAttr
{
Dir
:
attr
.
Dir
,
Env
:
attr
.
Env
,
...
...
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