From 103317217de0ca4b59cc90a09badc744a4fba768 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 2 Jun 2024 20:58:49 -0700 Subject: [PATCH] os/signal: clarify that non-Go thread may change signal mask Fixes #67773 Change-Id: I05c9934a5b2719d22884c8546f4fadaa9978ac67 Reviewed-on: https://go-review.googlesource.com/c/go/+/589755 Auto-Submit: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Commit-Queue: Ian Lance Taylor Reviewed-by: Michael Pratt Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- src/os/signal/doc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/signal/doc.go b/src/os/signal/doc.go index 07ed9ce524..900704a1a9 100644 --- a/src/os/signal/doc.go +++ b/src/os/signal/doc.go @@ -146,8 +146,8 @@ Go behavior described above will not occur. This can be an issue with the SIGPROF signal in particular. The non-Go code should not change the signal mask on any threads -created by the Go runtime. If the non-Go code starts new threads of -its own, it may set the signal mask as it pleases. +created by the Go runtime. If the non-Go code starts new threads +itself, those threads may set the signal mask as they please. If the non-Go code starts a new thread, changes the signal mask, and then invokes a Go function in that thread, the Go runtime will -- 2.48.1