os: io: improve some docs on discarding fd's passed along w/ request

It's a non-trivial topic that's deserving a bit more explainations.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-02-11 11:55:52 +01:00
parent 72b4a6af13
commit 0d899a6ba7

View File

@ -253,7 +253,10 @@ ReadRequestFromClient(ClientPtr client)
}
#if XTRANS_SEND_FDS
/* Discard any unused file descriptors */
/* Discard any unused file descriptors:
those which are claimed to exist via SetReqFds(), but haven't been
consumed by the request handler via ReadFdFromClient()
*/
while (client->req_fds > 0) {
int req_fd = ReadFdFromClient(client);
if (req_fd >= 0)