1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Add helper function to make prctl system call.

Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
This commit is contained in:
Mrunal Patel 2014-06-13 11:38:32 -07:00
parent 7b366b1f01
commit 65567e125d

View file

@ -116,6 +116,13 @@ func Mknod(path string, mode uint32, dev int) error {
return syscall.Mknod(path, mode, dev)
}
func Prctl(option int, arg2, arg3, arg4, arg5 uintptr) error {
if _, _, err := syscall.Syscall6(syscall.SYS_PRCTL, uintptr(option), arg2, arg3, arg4, arg5, 0); err != 0 {
return err
}
return nil
}
func ParentDeathSignal(sig uintptr) error {
if _, _, err := syscall.RawSyscall(syscall.SYS_PRCTL, syscall.PR_SET_PDEATHSIG, sig, 0); err != 0 {
return err