From 88305e21d45e6f36334034b9e449b255b2d1f538 Mon Sep 17 00:00:00 2001 From: Graham Clark Date: Thu, 26 Nov 2020 11:35:26 -0500 Subject: [PATCH] Keep track of processes killed in the termshark log file Some larger loader changes are coming to address some intermittent bugs I found while jumping around pcaps using packet marks. --- pcap/cmds_unix.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcap/cmds_unix.go b/pcap/cmds_unix.go index 380a85f..9687ef1 100644 --- a/pcap/cmds_unix.go +++ b/pcap/cmds_unix.go @@ -10,6 +10,7 @@ import ( "syscall" "github.com/pkg/errors" + log "github.com/sirupsen/logrus" ) func (c *Command) PutInNewGroupOnUnix() { @@ -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) }