diff --git a/net/interfaces/interfaces_darwin_test.go b/net/interfaces/interfaces_darwin_test.go index ec53a0833..6767ec614 100644 --- a/net/interfaces/interfaces_darwin_test.go +++ b/net/interfaces/interfaces_darwin_test.go @@ -5,6 +5,7 @@ import ( "errors" + "io" "net/netip" "os/exec" "testing" @@ -69,6 +70,7 @@ func likelyHomeRouterIPDarwinExec() (ret netip.Addr, netif string, ok bool) { return } defer cmd.Wait() + defer io.Copy(io.Discard, stdout) // clear the pipe to prevent hangs var f []mem.RO lineread.Reader(stdout, func(lineb []byte) error {