diff options
Diffstat (limited to 'sd_daemon/notify.go')
-rw-r--r-- | sd_daemon/notify.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sd_daemon/notify.go b/sd_daemon/notify.go index 62e507f..b0a0d72 100644 --- a/sd_daemon/notify.go +++ b/sd_daemon/notify.go @@ -14,6 +14,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build linux + package sd_daemon import ( @@ -142,8 +144,9 @@ func (msg Notification) Send(unsetEnv bool) error { func socketUnixgram(name string) (*net.UnixConn, error) { fd, err := unix.Socket(unix.AF_UNIX, unix.SOCK_DGRAM|unix.SOCK_CLOEXEC, 0) if err != nil { - return nil, err + return nil, os.NewSyscallError("socket", err) } + defer unix.Close(fd) conn, err := net.FileConn(os.NewFile(uintptr(fd), name)) if err != nil { return nil, err |