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?
really? doesn't that require that you explicitly provide ->msg_control and ->msg_controllen?
-
-
looking through the kernel: __sys_recvmmsg() -> ___sys_recvmsg() -> sock_recvmsg() -> sock_recvmsg_nosec() -> unix_seqpacket_recvmsg() -> unix_dgram_recvmsg() -> scm_recv(), if ->msg_control is NULL, calls scm_destroy() and signals that to userspace with MSG_CTRUNC if possible
-
scm_destroy() -> __scm_destroy() -> fput() loop
- 2 more replies
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.