Skip to content

Commit

Permalink
SendNullByte implementation for OpenBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
mischief committed May 6, 2016
1 parent 5f6efc7 commit f68c842
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions transport_unixcred_openbsd.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package dbus

import "io"

func (t *unixTransport) SendNullByte() error {
n, _, err := t.UnixConn.WriteMsgUnix([]byte{0}, nil, nil)
if err != nil {
return err
}
if n != 1 {
return io.ErrShortWrite
}
return nil
}

0 comments on commit f68c842

Please sign in to comment.