[go] internal/poll, runtime: take the cancelling note on Plan 9

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Aug 10, 2026, 6:19:51 PM (12 hours ago) Aug 10
to David du Colombier, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Damien Neil, Dmitri Shuralyov, Dmitri Shuralyov, Richard Miller, golang...@luci-project-accounts.iam.gserviceaccount.com, Michael Pratt, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
internal/poll, runtime: take the cancelling note on Plan 9

CL 31521 implemented cancelable I/O on Plan 9 by
posting a hangup note to the process running the
system call, which ignores the note while it runs.

However, a note is delivered at the next kernel
exit, not when it is posted, so a note posted as
the system call completes arrives once the process
has stopped ignoring it, and kills the program.

This change counts the notes Cancel posts and
sleeps once per note still outstanding, so each
one arrives while it is still ignored.

Keeping the notes ignored for the life of the
thread would be simpler, but CL 71230 stopped
terminating locked threads on Plan 9, so the
thread is reused and would ignore every later
hangup.
Cq-Include-Trybots: luci.golang.try:gotip-plan9-386
Change-Id: I99bcfdfe4c2c6626063690b79cccaa2b3e0833e5
Reviewed-by: Richard Miller <millerr...@gmail.com>
Auto-Submit: Damien Neil <dn...@google.com>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Damien Neil <dn...@google.com>
Files:
  • M src/internal/poll/fd_io_plan9.go
  • M src/runtime/net_plan9.go
Change size: S
Delta: 2 files changed, 19 insertions(+), 6 deletions(-)
Branch: refs/heads/master
Submit Requirements:
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: master
Gerrit-Change-Id: I99bcfdfe4c2c6626063690b79cccaa2b3e0833e5
Gerrit-Change-Number: 810520
Gerrit-PatchSet: 2
Gerrit-Owner: David du Colombier <0in...@gmail.com>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: David du Colombier <0in...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Michael Pratt <mpr...@google.com>
Gerrit-Reviewer: Richard Miller <millerr...@gmail.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages