Skip to content

Commit 7f98c0e

Browse files
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Tobias Klauser <[email protected]>
1 parent 4ec5189 commit 7f98c0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/os/exec/exec_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,13 +453,13 @@ var testedAlreadyLeaked = false
453453

454454
// basefds returns the number of expected file descriptors
455455
// to be present in a process at start.
456-
// stdin, stdout, stderr, epoll/kqueue, maybe testlog
456+
// stdin, stdout, stderr, epoll/kqueue, epoll/kqueue pipe, maybe testlog
457457
func basefds() uintptr {
458458
n := os.Stderr.Fd() + 1
459459
// The poll (epoll/kqueue) descriptor can be numerically
460460
// either between stderr and the testlog-fd, or after
461461
// testlog-fd.
462-
if poll.IsPollDescriptor(n) {
462+
for poll.IsPollDescriptor(n) {
463463
n++
464464
}
465465
for _, arg := range os.Args {

0 commit comments

Comments
 (0)