Commit 7f98c0eb authored by Ian Lance Taylor's avatar Ian Lance Taylor

os/exec: skip possible netpoll pipe in known FDs in test

Fixes #35045

Change-Id: I90ac29882c7d03936c98c4116a8bccdd2ecbf76b
Reviewed-on: https://go-review.googlesource.com/c/go/+/202445
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarTobias Klauser <tobias.klauser@gmail.com>
parent 4ec51894
......@@ -453,13 +453,13 @@ var testedAlreadyLeaked = false
// basefds returns the number of expected file descriptors
// to be present in a process at start.
// stdin, stdout, stderr, epoll/kqueue, maybe testlog
// stdin, stdout, stderr, epoll/kqueue, epoll/kqueue pipe, maybe testlog
func basefds() uintptr {
n := os.Stderr.Fd() + 1
// The poll (epoll/kqueue) descriptor can be numerically
// either between stderr and the testlog-fd, or after
// testlog-fd.
if poll.IsPollDescriptor(n) {
for poll.IsPollDescriptor(n) {
n++
}
for _, arg := range os.Args {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment