Skip to content

Commit

Permalink
Keep track of processes killed in the termshark log file
Browse files Browse the repository at this point in the history
Some larger loader changes are coming to address some intermittent bugs
I found while jumping around pcaps using packet marks.
  • Loading branch information
gcla committed Nov 26, 2020
1 parent 7a2d301 commit 88305e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pcap/cmds_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"syscall"

"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
)

func (c *Command) PutInNewGroupOnUnix() {
Expand All @@ -25,5 +26,6 @@ func (c *Command) Kill() error {
if c.Cmd.Process == nil {
return errors.WithStack(ProcessNotStarted{Command: c.Cmd})
}
log.Infof("Sending SIGTERM to %v: %v", c.Cmd.Process.Pid, c.Cmd)
return syscall.Kill(-c.Cmd.Process.Pid, syscall.SIGTERM)
}

0 comments on commit 88305e2

Please sign in to comment.