mirror of https://github.com/hak5/overseer.git
fix rare nil ptr panic
parent
be5b0b50d8
commit
cfea0d4997
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue