diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-01-17 23:08:46 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-01-17 23:08:46 +0900 |
| commit | 16db3dabe2060d5a66948101e16709697bfb374a (patch) | |
| tree | e9bcd366596b8d385248c6accf32e5849530bbc2 /internal/prctl.go | |
| parent | c4de45021759e9c384485a451dfdf9c1d73f04ea (diff) | |
internal: do PR_SET_PDEATHSIG once
This prctl affects the entire process, doing it on every OS thread is pointless.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/prctl.go')
| -rw-r--r-- | internal/prctl.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/prctl.go b/internal/prctl.go index 1c03edd9..857371b5 100644 --- a/internal/prctl.go +++ b/internal/prctl.go @@ -12,7 +12,7 @@ func PR_SET_DUMPABLE__SUID_DUMP_DISABLE() error { } func PR_SET_PDEATHSIG__SIGKILL() error { - if _, _, errno := syscall.AllThreadsSyscall(syscall.SYS_PRCTL, syscall.PR_SET_PDEATHSIG, uintptr(syscall.SIGKILL), 0); errno != 0 { + if _, _, errno := syscall.RawSyscall(syscall.SYS_PRCTL, syscall.PR_SET_PDEATHSIG, uintptr(syscall.SIGKILL), 0); errno != 0 { return errno } |
