Commit f4faca60 authored by David du Colombier's avatar David du Colombier

runtime: don't terminate locked OS threads on Plan 9

CL 46037 and CL 46038 implemented termination of
locked OS threads when the goroutine exits.

However, this behavior leads to crashes of Go programs
using runtime.LockOSThread on Plan 9. This is notably
the case of the os/exec and net packages.

This change disables termination of locked OS threads
on Plan 9.

Updates #22227.

Change-Id: If9fa241bff1c0b68e7e9e321e06e5203b3923212
Reviewed-on: https://go-review.googlesource.com/71230Reviewed-by: default avatarAustin Clements <austin@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent d155b32f
......@@ -2671,8 +2671,10 @@ func goexit0(gp *g) {
// Return to mstart, which will release the P and exit
// the thread.
if GOOS != "plan9" { // See golang.org/issue/22227.
gogo(&_g_.m.g0.sched)
}
}
schedule()
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment