The comments:
/* FIXME if ret == -1 then fcntl can overwrite recv's errno */
in lib/tran_sock.c and lib/tran_pipe.c no longer appear to be applicable.
Using git log -S, I found that these FIXMEs were originally valid when a
recv_blocking() helper temporarily modified O_NONBLOCK via fcntl() after
a failed recv(), which could overwrite the original errno. That helper
has since been removed.
I could not find any fcntl() calls near recv(), recvmsg(), or read()
failure paths in either file in the current implementation.
Unless I am missing an execution path, these comments appear to be stale
and could be removed to avoid confusing future contributors.
Happy to send a patch if this is confirmed.
The comments:
in lib/tran_sock.c and lib/tran_pipe.c no longer appear to be applicable.
Using git log -S, I found that these FIXMEs were originally valid when a
recv_blocking() helper temporarily modified O_NONBLOCK via fcntl() after
a failed recv(), which could overwrite the original errno. That helper
has since been removed.
I could not find any fcntl() calls near recv(), recvmsg(), or read()
failure paths in either file in the current implementation.
Unless I am missing an execution path, these comments appear to be stale
and could be removed to avoid confusing future contributors.
Happy to send a patch if this is confirmed.