summaryrefslogtreecommitdiff
path: root/src/pkg/os/exec_posix.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/os/exec_posix.go')
-rw-r--r--src/pkg/os/exec_posix.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pkg/os/exec_posix.go b/src/pkg/os/exec_posix.go
index e2097700e..f37bfab58 100644
--- a/src/pkg/os/exec_posix.go
+++ b/src/pkg/os/exec_posix.go
@@ -9,11 +9,6 @@ import (
"syscall"
)
-// A Signal can represent any operating system signal.
-type Signal interface {
- String() string
-}
-
type UnixSignal int32
func (sig UnixSignal) String() string {
@@ -26,6 +21,9 @@ func (sig UnixSignal) String() string {
// StartProcess starts a new process with the program, arguments and attributes
// specified by name, argv and attr.
+//
+// StartProcess is a low-level interface. The exec package provides
+// higher-level interfaces.
func StartProcess(name string, argv []string, attr *ProcAttr) (p *Process, err Error) {
sysattr := &syscall.ProcAttr{
Dir: attr.Dir,
@@ -54,7 +52,9 @@ func (p *Process) Kill() Error {
// Exec replaces the current process with an execution of the
// named binary, with arguments argv and environment envv.
// If successful, Exec never returns. If it fails, it returns an Error.
-// StartProcess is almost always a better way to execute a program.
+//
+// To run a child process, see StartProcess (for a low-level interface)
+// or the exec package (for higher-level interfaces).
func Exec(name string, argv []string, envv []string) Error {
if envv == nil {
envv = Environ()