summaryrefslogtreecommitdiff
path: root/sd_daemon/listen_fds.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-19 01:57:19 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-19 01:57:19 -0500
commit9709d1ec5dc9e1cd1ef17b8cc4f5257cae6bf31c (patch)
tree5dfdfa38b3cbeda7cf442f2ff0105f0a2d3e4b03 /sd_daemon/listen_fds.go
parent93740fc6f14bf6b285efa010af0b309e9086d0b8 (diff)
Use golang.org/x/sys/unix instead of the deprecated syscall.
Diffstat (limited to 'sd_daemon/listen_fds.go')
-rw-r--r--sd_daemon/listen_fds.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd_daemon/listen_fds.go b/sd_daemon/listen_fds.go
index bf30432..cdcb3cd 100644
--- a/sd_daemon/listen_fds.go
+++ b/sd_daemon/listen_fds.go
@@ -19,7 +19,8 @@ import (
"os"
"strconv"
"strings"
- "syscall"
+
+ "golang.org/x/sys/unix"
)
// ListenFds returns a list of file descriptors passed in by the
@@ -55,7 +56,7 @@ func ListenFds(unsetEnv bool) []*os.File {
files := make([]*os.File, 0, nfds)
for i := 0; i < nfds; i++ {
fd := i + 3
- syscall.CloseOnExec(fd)
+ unix.CloseOnExec(fd)
name := "unknown"
if i < len(names) {
name = names[i]