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
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