From c8722b25d1fb8b0b3696257ec7e955eb421f15a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Bo=C4=8Dek?= Date: Tue, 14 Jun 2022 09:58:52 +0200 Subject: [PATCH] syscall: clarify Pdeathsig function on Linux Updates #27505 --- src/syscall/exec_linux.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/syscall/exec_linux.go b/src/syscall/exec_linux.go index 6d4b6939ad..ede8247da9 100644 --- a/src/syscall/exec_linux.go +++ b/src/syscall/exec_linux.go @@ -45,7 +45,11 @@ type SysProcAttr struct { // number in the parent process. Foreground bool Pgid int // Child's process group ID if Setpgid. - Pdeathsig Signal // Signal that the process will get when its parent dies (Linux and FreeBSD only) + // Pdeathsig, if non-zero, is a signal that the kernel will send to + // the child process when the creating thread dies. Note that the signal + // is sent on thread termination, which may happen before process termination. + // There are more details at https://go.dev/issue/27505. + Pdeathsig Signal Cloneflags uintptr // Flags for clone calls (Linux only) Unshareflags uintptr // Flags for unshare calls (Linux only) UidMappings []SysProcIDMap // User ID mappings for user namespaces.