summaryrefslogtreecommitdiff
path: root/sd_daemon
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-18 13:28:33 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-18 16:50:06 -0500
commit76e70fbe6ec8978c1cf36a966bca31c7417d5c67 (patch)
tree8178506eb74eecf40432886bae822bd663d4e482 /sd_daemon
parent3f19c1f98bd00eda75d1f547dc5f484cd32db6b2 (diff)
sd_daemon: Update a comment.
Diffstat (limited to 'sd_daemon')
-rw-r--r--sd_daemon/notify.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/sd_daemon/notify.go b/sd_daemon/notify.go
index 8b813cc..f2b9076 100644
--- a/sd_daemon/notify.go
+++ b/sd_daemon/notify.go
@@ -114,11 +114,15 @@ func Notify(pid int, unsetEnv bool, state string, files []*os.File) error {
return err
}
-// socketUnixgram wraps socket(2), but doesn't bind(2) to anything.
-// This is an ugly hack because none of the functions in "net"
-// actually allow you to get a AF_UNIX socket not bound to anything (I
-// think that sentence is still true if you take out "AF_UNIX", but
-// I'm not totally certain of that).
+// socketUnixgram wraps socket(2), but doesn't bind(2) or connect(2)
+// the socket to anything. This is an ugly hack because none of the
+// functions in "net" actually allow you to get a AF_UNIX socket not
+// bound/connected to anything.
+//
+// At some point you begin to question if it is worth it to keep up
+// the high-level interface of "net", and messing around with FileConn
+// and UnixConn. Maybe we just drop to using unix.Socket and
+// unix.SendmsgN directly.
func socketUnixgram(name string) (*net.UnixConn, error) {
fd, err := unix.Socket(unix.AF_UNIX, unix.SOCK_DGRAM|unix.SOCK_CLOEXEC, 0)
if err != nil {