> If a program calls connect on a non-blocking socket with no pending > acceptors (i.e. threads calling accept on the listening end of a > socket), connect fails with EWOULDBLOCK.
This is doubly wrong. When listen has been called and the queue limit not reached, then the connection should be established immediately and not wait for someone to call accept. When the connection cannot be established immediately and the socket is nonblocking, connect should return EINPROGRESS. This should happen when the queue limit has been reached. (And then the client socket should be in "waiting to connect" state and a later connect call should return EALREADY.) I haven't read through your patch yet, but these are the semantics that pflocal should be implementing. For a real network stack it's the same. The listen queue limit being reached on the remote end corresponds to the client getting an ACK as if its packet hadn't gone through. _______________________________________________ Bug-hurd mailing list Bug-hurd@gnu.org http://lists.gnu.org/mailman/listinfo/bug-hurd