Introduced SCM_CREDENTIALS / SCM_CREDS in the socket control msgs.
This commit is contained in:
@@ -169,7 +169,7 @@ func nxt_go_port_send(pid C.int, id C.int, buf unsafe.Pointer, buf_size C.int,
|
||||
|
||||
//export nxt_go_port_recv
|
||||
func nxt_go_port_recv(pid C.int, id C.int, buf unsafe.Pointer, buf_size C.int,
|
||||
oob unsafe.Pointer, oob_size C.int) C.ssize_t {
|
||||
oob unsafe.Pointer, oob_size *C.size_t) C.ssize_t {
|
||||
|
||||
key := port_key{
|
||||
pid: int(pid),
|
||||
@@ -184,7 +184,7 @@ func nxt_go_port_recv(pid C.int, id C.int, buf unsafe.Pointer, buf_size C.int,
|
||||
}
|
||||
|
||||
n, oobn, _, _, err := p.rcv.ReadMsgUnix(GoBytes(buf, buf_size),
|
||||
GoBytes(oob, oob_size))
|
||||
GoBytes(oob, C.int(*oob_size)))
|
||||
|
||||
if err != nil {
|
||||
if nerr, ok := err.(*net.OpError); ok {
|
||||
@@ -196,6 +196,9 @@ func nxt_go_port_recv(pid C.int, id C.int, buf unsafe.Pointer, buf_size C.int,
|
||||
nxt_go_warn("read result %d (%d), %s", n, oobn, err)
|
||||
|
||||
n = -1
|
||||
|
||||
} else {
|
||||
*oob_size = C.size_t(oobn)
|
||||
}
|
||||
|
||||
return C.ssize_t(n)
|
||||
|
||||
Reference in New Issue
Block a user