Commit Graph

5 Commits

Author SHA1 Message Date
David van Moolenbroek
27698972fd UDS: sendmsg/recvmsg fixes
- sendmsg: the accumulation of multiple in-flight file descriptors was
  already described in the comments; now the code actually does what
  the comments say :) -- also, added robustness in case of a failure;
- recvmsg: only create a socket rights message if there are file
  descriptors pending at all;
- recvmsg: copy back the control message length;
- recvmsg: use CMSG_SPACE instead of CMSG_LEN to compute sizes.

Not sure if all of this is now working according to specification,
but at least tmux seems to be happy with it.

Change-Id: I8d076c14c3ff3220b7fea730e0f08f4b4254ede5
2013-10-12 13:57:51 +02:00
David van Moolenbroek
64d1109576 UDS: add support for FIONREAD
Change-Id: I50030012b408242a86f8c55017429acdadff49d1
2013-10-12 13:57:18 +02:00
David van Moolenbroek
4cf735431e UDS: support for nonblocking sockets
This patch includes several other fixes, which are now tested in the
test56 test set.

Change-Id: I9535d5a6c072abf966252838522c5f65b353c6c2
2013-10-12 13:56:34 +02:00
David van Moolenbroek
d2bdae3378 UDS: clean up source code
- move VFS calls to a separate source file;
- solve a few subtle bugs, mostly in error handling;
- simplify debug reporting code;
- make a few definitions more independent;
- restyle to something closer to KNF.

Change-Id: I7b0537adfccac8b92b5cc3e78dac9f5ce3c79f03
2013-10-12 13:56:20 +02:00
David van Moolenbroek
0bd6e6a1cd UDS: split off from PFS
Change-Id: I769cbd64aa6e5e85a797caf0f8bbb4c20e145263
2013-10-12 13:56:13 +02:00