Commit b0b0d982 authored by Andrew G. Morgan's avatar Andrew G. Morgan Committed by Ian Lance Taylor
Browse files

runtime: linux iscgo support for not blocking nptl signals

Under linux+cgo, OS threads are launched via pthread_create().
This abstraction, under linux, requires we avoid blocking
signals 32,33 and 34 indefinitely because they are needed to
reliably execute POSIX-semantics threading in glibc and/or musl.

When blocking signals the go runtime generally re-enables them
quickly. However, when a thread exits (under cgo, this is
via a return from mstart()), we avoid a deadlock in C-code by
not blocking these three signals.

Fixes #42494

Change-Id: I02dfb2480a1f97d11679e0c4b132b51bddbe4c14
Reviewed-on: https://go-review.googlesource.com/c/go/+/269799


Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Reviewed-by: default avatarAustin Clements <austin@google.com>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
parent 223331fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment