]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.25] os,internal/poll: don't call IsNonblock for consoles and...
authorqmuntal <quimmuntal@gmail.com>
Wed, 26 Nov 2025 09:25:16 +0000 (10:25 +0100)
committerMichael Knyszek <mknyszek@google.com>
Fri, 19 Dec 2025 17:54:44 +0000 (09:54 -0800)
commit93f5d1c27e6942dc582da8165400bdeff62e5877
tree05029ec4585602916e2a016c6ae68d47abe3cd61
parentd5bfdcbc47c4ab7943ce40ad34d0d4acf13cb33d
[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-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
(cherry picked from commit CL 724640)
Reviewed-on: https://go-review.googlesource.com/c/go/+/725580
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/internal/poll/fd_windows.go
src/os/file_windows.go
src/os/os_windows_test.go
src/os/removeall_windows.go
src/os/root_windows.go