blob: be41d0d7d07759d3962466ae122b2f1473eda817 [file] [log] [blame]
package core
import (
"io"
"syscall"
"v.io/core/veyron/lib/modules"
)
func init() {
modules.RegisterChild(ExecCommand, "", execCommand)
}
func execCommand(stdin io.Reader, stdout, stderr io.Writer, env map[string]string, args ...string) error {
envSlice := []string{}
for key, value := range env {
envSlice = append(envSlice, key+"="+value)
}
return syscall.Exec(args[1], args[1:], envSlice)
}