diff options
Diffstat (limited to 'libgo/go/os/exec_unix.go')
-rw-r--r-- | libgo/go/os/exec_unix.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libgo/go/os/exec_unix.go b/libgo/go/os/exec_unix.go index e1adb203e0a..242bda702c6 100644 --- a/libgo/go/os/exec_unix.go +++ b/libgo/go/os/exec_unix.go @@ -7,6 +7,7 @@ package os import ( + "errors" "runtime" "syscall" ) @@ -24,9 +25,9 @@ const ( // the options // Wait waits for the Process to exit or stop, and then returns a -// Waitmsg describing its status and an Error, if any. The options +// Waitmsg describing its status and an error, if any. The options // (WNOHANG etc.) affect the behavior of the Wait call. -func (p *Process) Wait(options int) (w *Waitmsg, err Error) { +func (p *Process) Wait(options int) (w *Waitmsg, err error) { if p.Pid == -1 { return nil, EINVAL } @@ -52,9 +53,9 @@ func (p *Process) Wait(options int) (w *Waitmsg, err Error) { } // Signal sends a signal to the Process. -func (p *Process) Signal(sig Signal) Error { +func (p *Process) Signal(sig Signal) error { if p.done { - return NewError("os: process already finished") + return errors.New("os: process already finished") } if e := syscall.Kill(p.Pid, int(sig.(UnixSignal))); e != 0 { return Errno(e) @@ -63,7 +64,7 @@ func (p *Process) Signal(sig Signal) Error { } // Release releases any resources associated with the Process. -func (p *Process) Release() Error { +func (p *Process) Release() error { // NOOP for unix. p.Pid = -1 // no need for a finalizer anymore @@ -74,7 +75,7 @@ func (p *Process) Release() Error { // FindProcess looks for a running process by its pid. // The Process it returns can be used to obtain information // about the underlying operating system process. -func FindProcess(pid int) (p *Process, err Error) { +func FindProcess(pid int) (p *Process, err error) { // NOOP for unix. return newProcess(pid, 0), nil } |