[go/release-branch.go1.25] [release-branch.go1.25] os,internal/poll: don't call IsNonblock for consoles and Stdin

2 views
Skip to first unread message

Michael Knyszek (Gerrit)

unread,
Dec 19, 2025, 12:54:48 PM (2 days ago) Dec 19
to Quim Muntal, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Cherry Mui, Dmitri Shuralyov, Damien Neil, Go LUCI, Dmitri Shuralyov, golang-co...@googlegroups.com

Michael Knyszek submitted the change

Change information

Commit message:
[release-branch.go1.25] os,internal/poll: don't call IsNonblock for consoles and Stdin

windows.IsNonblock can block for synchronous handles that have an
outstanding I/O operation. Console handles are always synchronous, so
we should not call IsNonblock for them. Stdin is often a pipe, and
almost always a synchronous handle, so we should not call IsNonblock for
it either. This avoids potential deadlocks during os package
initialization, which calls NewFile(syscall.Stdin).

Fixes #76392

Change-Id: I1603932b0a99823019aa0cad960f94cee9996505
Reviewed-on: https://go-review.googlesource.com/c/go/+/724640
LUCI-TryBot-Result: Go LUCI <golang...@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dn...@google.com>
Auto-Submit: Damien Neil <dn...@google.com>
Reviewed-by: Cherry Mui <cher...@google.com>
(cherry picked from commit CL 724640)
Reviewed-on: https://go-review.googlesource.com/c/go/+/725580
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Files:
  • M src/internal/poll/fd_windows.go
  • M src/os/file_windows.go
  • M src/os/os_windows_test.go
  • M src/os/removeall_windows.go
  • M src/os/root_windows.go
Change size: M
Delta: 5 files changed, 95 insertions(+), 13 deletions(-)
Branch: refs/heads/release-branch.go1.25
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Cherry Mui, +2 by Dmitri Shuralyov
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: release-branch.go1.25
Gerrit-Change-Id: I1603932b0a99823019aa0cad960f94cee9996505
Gerrit-Change-Number: 725580
Gerrit-PatchSet: 3
Gerrit-Owner: Quim Muntal <quimm...@gmail.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
Gerrit-Reviewer: Quim Muntal <quimm...@gmail.com>
Gerrit-CC: Damien Neil <dn...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages