summaryrefslogtreecommitdiff
path: root/libgo/go/os/exec_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/os/exec_unix.go')
-rw-r--r--libgo/go/os/exec_unix.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgo/go/os/exec_unix.go b/libgo/go/os/exec_unix.go
index 3c05b8f0806..1b1e3350b84 100644
--- a/libgo/go/os/exec_unix.go
+++ b/libgo/go/os/exec_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
package os
@@ -38,6 +38,9 @@ func (p *Process) signal(sig Signal) error {
if p.done() {
return errors.New("os: process already finished")
}
+ if p.Pid == -1 {
+ return errors.New("os: process already released")
+ }
s, ok := sig.(syscall.Signal)
if !ok {
return errors.New("os: unsupported signal type")