diff options
Diffstat (limited to 'src/pkg/os/exec_unix.go')
-rw-r--r-- | src/pkg/os/exec_unix.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pkg/os/exec_unix.go b/src/pkg/os/exec_unix.go index 5572e628e..1b1e3350b 100644 --- a/src/pkg/os/exec_unix.go +++ b/src/pkg/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 +// +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") |