summaryrefslogtreecommitdiff
path: root/sd_daemon/notify.go
diff options
context:
space:
mode:
Diffstat (limited to 'sd_daemon/notify.go')
-rw-r--r--sd_daemon/notify.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/sd_daemon/notify.go b/sd_daemon/notify.go
index 360e364..76ffe81 100644
--- a/sd_daemon/notify.go
+++ b/sd_daemon/notify.go
@@ -20,7 +20,8 @@ import (
"bytes"
"net"
"os"
- "syscall"
+
+ "golang.org/x/sys/unix"
)
// Notify sends a message from process pid to the service manager
@@ -81,17 +82,13 @@ func Notify(pid int, unsetEnv bool, state string, files []*os.File) error {
for i := range files {
fds[i] = int(files[i].Fd())
}
- cmsg := syscall.UnixRights(fds...)
+ cmsg := unix.UnixRights(fds...)
cmsgs = append(cmsgs, cmsg)
}
havePid := pid > 0 && pid != os.Getpid()
if havePid {
- // The types of members of syscall.Ucred aren't
- // guaranteed across processors. However,
- // fortunately, they are the same on all supported
- // processors as of go 1.7.4.
- cmsg := syscall.UnixCredentials(&syscall.Ucred{
+ cmsg := unix.UnixCredentials(&unix.Ucred{
Pid: int32(pid),
Uid: uint32(os.Getuid()),
Gid: uint32(os.Getgid()),