refactor(deps): Manage deps with goven

This commit is contained in:
Brian Waldon
2014-03-12 19:36:31 -07:00
parent 8830bc8fef
commit 568770be04
93 changed files with 26 additions and 26 deletions

View File

@@ -0,0 +1,22 @@
// +build !darwin
package dbus
import (
"io"
"os"
"syscall"
)
func (t *unixTransport) SendNullByte() error {
ucred := &syscall.Ucred{Pid: int32(os.Getpid()), Uid: uint32(os.Getuid()), Gid: uint32(os.Getgid())}
b := syscall.UnixCredentials(ucred)
_, oobn, err := t.UnixConn.WriteMsgUnix([]byte{0}, b, nil)
if err != nil {
return err
}
if oobn != len(b) {
return io.ErrShortWrite
}
return nil
}