So I have an AF_UNIX/SOCK_SEQPACKET socket on Linux. When reading from it, how do I distinguish a zero-length datagram from EOF on read() or recv() (and friends) in a safe, minimal and correct way? Ideas?
-
-
so you only have to deal with FD flooding if there is some other type of control message you do want to receive (like SCM_CREDENTIALS)
-
I am sure the majority of progs using recvmsg() set the control data ptr, because it's probably the main reason to prefer recvmsg() over recvfrom()... Hence my educated guess is that if you look for it, you'll find tons of progs not dealing with unexpected SCM_RIGHTS correctly...
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.