diff --git a/src/os/exec.go b/src/os/exec.go index fada70f479..33413b9a39 100644 --- a/src/os/exec.go +++ b/src/os/exec.go @@ -62,7 +62,7 @@ type Process struct { } func StartProcess(name string, argv []string, attr *ProcAttr) (*Process, error) { - return nil, &PathError{Op: "fork/exec", Path: name, Err: ErrNotImplemented} + return startProcess(name, argv, attr) } func (p *Process) Wait() (*ProcessState, error) { diff --git a/src/os/exec_linux.go b/src/os/exec_linux.go index 345b32b04e..0fc98d8a51 100644 --- a/src/os/exec_linux.go +++ b/src/os/exec_linux.go @@ -101,7 +101,7 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) // The StartProcess function creates a new process by forking the current process and then calling execve to replace the current process with the new process. // It thereby replaces the newly created process with the specified command and arguments. func startProcess(name string, argv []string, attr *ProcAttr) (p *Process, err error) { - pid, err := ForkExec(name, argv, attr) + pid, err := forkExec(name, argv, attr) if err != nil { return nil, err } diff --git a/src/os/exec_posix_test.go b/src/os/exec_linux_test.go similarity index 100% rename from src/os/exec_posix_test.go rename to src/os/exec_linux_test.go