diff --git a/proc_master.go b/proc_master.go index 767d2f8..e2be659 100644 --- a/proc_master.go +++ b/proc_master.go @@ -144,9 +144,11 @@ func (mp *master) handleSignal(s os.Signal) { } func (mp *master) sendSignal(s os.Signal) { - if err := mp.slaveCmd.Process.Signal(s); err != nil { - mp.debugf("signal failed (%s), assuming slave process died unexpectedly", err) - os.Exit(1) + if mp.slaveCmd != nil && mp.slaveCmd.Process != nil { + if err := mp.slaveCmd.Process.Signal(s); err != nil { + mp.debugf("signal failed (%s), assuming slave process died unexpectedly", err) + os.Exit(1) + } } }