Files
heimdal/lib
Taylor R Campbell 253a001ebc Fix use of accept() in test socks4a proxy.
The read() in readall() to read the SOCKS4a request was sometimes
failing with EAGAIN, which it wasn't prepared for, causing the
request to be rejected and the test to fail.

I wrote this code specifically under the assumption the fd would be
in blocking mode, and in the original draft I wrote with stdin/stdout
under socat that was true.  But when I adapted this to do its own
bind/listen/accept logic, I broke it, because POSIX leaves it
unspecified whether accept() inherits the O_NONBLOCK setting or not:

https://pubs.opengroup.org/onlinepubs/9799919799/functions/accept4.html

And the traditional BSD semantics is to inherit O_NONBLOCK.

So, just explicitly clear O_NONBLOCK on the fd returned by accept().
2026-01-21 10:35:22 -06:00
..
2026-01-18 19:06:17 -06:00
2026-01-18 19:06:17 -06:00
2026-01-20 13:48:25 -06:00
2026-01-18 23:27:57 -06:00
2024-06-16 23:30:48 -04:00
2026-01-18 23:27:57 -06:00
2024-06-16 23:30:48 -04:00