index work

This commit is contained in:
Mark McGranaghan
2012-09-23 17:45:04 -07:00
parent 997fcafeca
commit e4b083d49b
78 changed files with 30 additions and 56 deletions

View File

@@ -0,0 +1,20 @@
// ## Exec'ing Processes
package main
import "syscall"
import "os"
import "os/exec"
func main() {
binary, lookErr := exec.LookPath("ls")
if lookErr != nil {
panic(lookErr)
}
execErr := syscall.Exec(binary, []string{"-a", "-l", "-h"}, os.Environ())
if execErr != nil {
panic(execErr)
}
}
// todo: note lack of fork