This website works better with JavaScript.
Home
Help
Register
Sign In
mirrors
/
libowfat
mirror of
/home/gitosis/repositories/libowfat.git
Watch
1
Star
0
Fork
0
Code
Releases
1
Activity
Browse Source
actually return 0 on success in io_passfd
master
Felix von Leitner
17 years ago
parent
c7adf4e307
commit
1213467cfe
2 changed files
with
3 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
io/io_passfd.3
+1
-1
io/io_passfd.c
+ 2
- 0
io/io_passfd.3
View File
@ -15,5 +15,7 @@ system).
The peer can then use io_receivefd(3) to receive the file descriptor.
Note that the passed descriptor stays open in the sending process.
.SH "RETURN VALUE"
io_passfd returns 0 on success, -1 on error (setting errno accordingly).
.SH "SEE ALSO"
io_receivefd(3)
+ 1
- 1
io/io_passfd.c
View File
@ -31,5 +31,5 @@ int io_passfd(int64 sock,int64 fd) {
cmsg
-
>
cmsg_len
=
CMSG_LEN
(
sizeof
(
int
)
)
;
*
(
(
int
*
)
CMSG_DATA
(
cmsg
)
)
=
fd
;
msg
.
msg_controllen
=
cmsg
-
>
cmsg_len
;
return
sendmsg
(
sock
,
&
msg
,
0
)
;
return
sendmsg
(
sock
,
&
msg
,
0
)
>
=
0
?
0
:
-
1
;
}
Write
Preview
Loading…
Cancel
Save