Commit e2a64d8480 for golang
commit e2a64d848096b8d1116bd549d92cda398a5a9a01
Author: Tobias Klauser <tklauser@distanz.ch>
Date: Thu Dec 3 14:16:41 2026 +0100
internal/poll: ignore EINTR in (*FD).Fchdir
The fchdir syscall may return EINTR. Ignore and retry the syscall in
that case.
Change-Id: Ic913710670afb458c0ec6f9f5dc6f2d9f0739ee4
Reviewed-on: https://go-review.googlesource.com/c/go/+/868702
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
diff --git a/src/internal/poll/fd_unixjs.go b/src/internal/poll/fd_unixjs.go
index 090974d2b0..620adf1711 100644
--- a/src/internal/poll/fd_unixjs.go
+++ b/src/internal/poll/fd_unixjs.go
@@ -43,7 +43,9 @@ func (fd *FD) Fchdir() error {
return err
}
defer fd.decref()
- return syscall.Fchdir(fd.Sysfd)
+ return ignoringEINTR(func() error {
+ return syscall.Fchdir(fd.Sysfd)
+ })
}
// ReadDirent wraps syscall.ReadDirent.