From e99914d94ecb121a95e3b548e746c67781d89adb Mon Sep 17 00:00:00 2001 From: Jingwen Owen Ou Date: Mon, 17 Jun 2013 14:27:43 -0700 Subject: [PATCH 1/2] Fix the Exec'ing processes example --- examples/execing-processes/execing-processes.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/execing-processes/execing-processes.go b/examples/execing-processes/execing-processes.go index 2be31e6..9920213 100644 --- a/examples/execing-processes/execing-processes.go +++ b/examples/execing-processes/execing-processes.go @@ -27,8 +27,10 @@ func main() { // `Exec` requires arguments in slice form (as // apposed to one big string). We'll give `ls` a few - // common arguments. - args := []string{"-a", "-l", "-h"} + // common arguments. It has to include the program + // 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) // to use. Here we just provide our current From e8ce3a753efdf40a5bbaf0b69ecfa9789c26ceaf Mon Sep 17 00:00:00 2001 From: Jingwen Owen Ou Date: Mon, 17 Jun 2013 14:32:37 -0700 Subject: [PATCH 2/2] Check in HTML assets --- public/execing-processes | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/execing-processes b/public/execing-processes index a2639f1..f65a863 100644 --- a/public/execing-processes +++ b/public/execing-processes @@ -98,11 +98,13 @@ we’ll use exec.LookPath to find it (probably

Exec requires arguments in slice form (as apposed to one big string). We’ll give ls a few -common arguments.

+common arguments. It has to include the program +name as the first argument. Details see +man 2 execve

-
    args := []string{"-a", "-l", "-h"}
+            
    args := []string{"ls", "-a", "-l", "-h"}