Fix the Exec'ing processes example
This commit is contained in:
parent
db5276c751
commit
e99914d94e
@ -27,8 +27,10 @@ func main() {
|
|||||||
|
|
||||||
// `Exec` requires arguments in slice form (as
|
// `Exec` requires arguments in slice form (as
|
||||||
// apposed to one big string). We'll give `ls` a few
|
// apposed to one big string). We'll give `ls` a few
|
||||||
// common arguments.
|
// common arguments. It has to include the program
|
||||||
args := []string{"-a", "-l", "-h"}
|
// name as the first argument. Details see
|
||||||
|
// `man 2 execve`
|
||||||
|
args := []string{"ls", "-a", "-l", "-h"}
|
||||||
|
|
||||||
// `Exec` also needs a set of [environment variables](environment-variables)
|
// `Exec` also needs a set of [environment variables](environment-variables)
|
||||||
// to use. Here we just provide our current
|
// to use. Here we just provide our current
|
||||||
|
Loading…
x
Reference in New Issue
Block a user