Skip to content

Commit c8722b2

Browse files
committed
syscall: clarify Pdeathsig function on Linux
Updates #27505
1 parent c29be2d commit c8722b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/syscall/exec_linux.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ type SysProcAttr struct {
4545
// number in the parent process.
4646
Foreground bool
4747
Pgid int // Child's process group ID if Setpgid.
48-
Pdeathsig Signal // Signal that the process will get when its parent dies (Linux and FreeBSD only)
48+
// Pdeathsig, if non-zero, is a signal that the kernel will send to
49+
// the child process when the creating thread dies. Note that the signal
50+
// is sent on thread termination, which may happen before process termination.
51+
// There are more details at https://go.dev/issue/27505.
52+
Pdeathsig Signal
4953
Cloneflags uintptr // Flags for clone calls (Linux only)
5054
Unshareflags uintptr // Flags for unshare calls (Linux only)
5155
UidMappings []SysProcIDMap // User ID mappings for user namespaces.

0 commit comments

Comments
 (0)