Browse files

Fix psnotify netlink listener

Change-Id: If5c0bd188b6f969f218909ef5cf432f9fcb80f9f
  • Loading branch information...
1 parent 95cbeda commit 504068857a69325af5979a1179aa6c758e14bb16 @dougm dougm committed Dec 4, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 psnotify/psnotify_linux.go
View
3 psnotify/psnotify_linux.go
@@ -209,7 +209,6 @@ func (listener *netlinkListener) bind() error {
listener.addr = &syscall.SockaddrNetlink{
Family: syscall.AF_NETLINK,
Groups: _CN_IDX_PROC,
- Pid: uint32(os.Getpid()),
}
err = syscall.Bind(listener.sock, listener.addr)
@@ -246,7 +245,7 @@ func (listener *netlinkListener) send(op uint32) error {
pr.Data.Len = uint16(binary.Size(op))
- buf := bytes.NewBuffer(make([]byte, pr.Header.Len))
+ buf := bytes.NewBuffer(make([]byte, 0, pr.Header.Len))
binary.Write(buf, byteOrder, pr)
binary.Write(buf, byteOrder, op)

0 comments on commit 5040688

Please sign in to comment.