Fix error on doulbe Kill calls
This returns a typed error for calls to Kill when the process has already finished. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -167,7 +167,10 @@ func (e *execProcess) Resize(ws console.WinSize) error {
|
||||
}
|
||||
|
||||
func (e *execProcess) Signal(sig int) error {
|
||||
return unix.Kill(e.pid, syscall.Signal(sig))
|
||||
if err := unix.Kill(e.pid, syscall.Signal(sig)); err != nil {
|
||||
return checkKillError(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *execProcess) Stdin() io.Closer {
|
||||
|
Reference in New Issue
Block a user