mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
Add binary path to integration test utiltool
This commit is contained in:
parent
7d3b45f1a9
commit
34e035858d
1 changed files with 12 additions and 1 deletions
|
@ -9,6 +9,8 @@ import (
|
||||||
"github.com/safing/portmaster/network/packet"
|
"github.com/safing/portmaster/network/packet"
|
||||||
"github.com/safing/portmaster/network/socket"
|
"github.com/safing/portmaster/network/socket"
|
||||||
"github.com/safing/portmaster/network/state"
|
"github.com/safing/portmaster/network/state"
|
||||||
|
|
||||||
|
processInfo "github.com/shirou/gopsutil/process"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -105,7 +107,16 @@ func checkAndPrintSocketInfoIfNew(c string, s socket.Info) {
|
||||||
|
|
||||||
// Print result.
|
// Print result.
|
||||||
if err == nil {
|
if err == nil {
|
||||||
fmt.Printf("%s %d\n", c, s.GetPID())
|
|
||||||
|
pInfo, err := processInfo.NewProcess(int32(s.GetPID()))
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("%s %d no binary: %s\n", c, s.GetPID(), err)
|
||||||
|
} else {
|
||||||
|
exe, _ := pInfo.Exe()
|
||||||
|
fmt.Printf("%s %d %s\n", c, s.GetPID(), exe)
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("%s %d (err: %s)\n", c, s.GetPID(), err)
|
fmt.Printf("%s %d (err: %s)\n", c, s.GetPID(), err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue