• Andrew Williams's avatar
    syscall: relocate linux death signal code · 9b379d7e
    Andrew Williams authored
    Fix bug on Linux SysProcAttr handling: setting both Pdeathsig and
    Credential caused Pdeathsig to be ignored. This is because the kernel
    clears the deathsignal field when performing a setuid/setgid
    system call.
    
    Avoid this by moving Pdeathsig handling after Credential handling.
    
    Fixes #9686
    
    Change-Id: Id01896ad4e979b8c448e0061f00aa8762ca0ac94
    Reviewed-on: https://go-review.googlesource.com/3290Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    9b379d7e
exec_linux.go 10.1 KB