Merge pull request #632 from tklauser/rm-prctl
utils: remove unused Prctl wrapper
This commit is contained in:
commit
91977d3989
1 changed files with 0 additions and 10 deletions
|
@ -6,7 +6,6 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
|
||||||
|
|
||||||
systemdDbus "github.com/coreos/go-systemd/dbus"
|
systemdDbus "github.com/coreos/go-systemd/dbus"
|
||||||
"github.com/godbus/dbus"
|
"github.com/godbus/dbus"
|
||||||
|
@ -44,15 +43,6 @@ func ExecCmdWithStdStreams(stdin io.Reader, stdout, stderr io.Writer, name strin
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prctl is a way to make the prctl linux syscall
|
|
||||||
func Prctl(option int, arg2, arg3, arg4, arg5 uintptr) (err error) {
|
|
||||||
_, _, e1 := syscall.Syscall6(syscall.SYS_PRCTL, uintptr(option), arg2, arg3, arg4, arg5, 0)
|
|
||||||
if e1 != 0 {
|
|
||||||
err = e1
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// StatusToExitCode converts wait status code to an exit code
|
// StatusToExitCode converts wait status code to an exit code
|
||||||
func StatusToExitCode(status int) int {
|
func StatusToExitCode(status int) int {
|
||||||
return ((status) & 0xff00) >> 8
|
return ((status) & 0xff00) >> 8
|
||||||
|
|
Loading…
Reference in a new issue