mirror of
https://github.com/golang/go
synced 2024-11-23 18:40:03 -07:00
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: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
parent
4ec51894ee
commit
7f98c0eb03
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user