[Xcb] [PATCH] Use recv(2) instead of read(2).

Rémi Denis-Courmont remi at remlab.net
Sat Apr 24 13:30:38 PDT 2010

----- Message d'origine -----
> It's not a NAK as much as a "needs thought/investigation".    The recv(3)
> man page only mentions socket support not pipes, so I don't think it
> works with them, but haven't tested.

I do not have the POSIX spec under my eyes right now. However, socket calls are supposed to return ENOTSOCK on non-sockets. Pipes and FIFOs (call them named pipes if you want) are explicitly a different type of file (see fstat() for instance). So I suspect it would be "illegal" for an OS to allow send/recv on pipes.

Too bad in a way as send/recv allow potentially useful flags such as MSG_NOSIGNAL, MSG_DONTWAIT, MSG_WAITALL...

At least it wont work on Linux, but I guess we do not care in this particular case.

More information about the Xcb mailing list