On 26 Jul, Don Lewis wrote: > It looks like it should be possible to patch serf to handle this, but: > * Should POLLIN be set for this event?
I don't think it should, but the standard doesn't cover this case. On a successful non-blocking connect(), our man page says that select(2) will indicate that the fd is writeable. The Open Group Base Specifications Issue 7 says that pselect(), select(), and poll() shall indicate that the socket is ready for writing. I haven't seen anything that says what should be done if the connect fails. > * What errno value should read() return in this case, if it is > ECONNREFUSED, then that should be documented. Our read(2) man page does not document that ENOTCONN can be returned, though we explicitly return it and it is listed as valid by The Open Group Base Specifications. It does not list the connect failure errno values other than ETIMEDOUT as valid for read(). Though read() should not be called before the connection is up, if it is I *think* these errors should be mapped to ENOTCONN, but handling ETIMEDOUT is trickier. If that error came from the connection attempt, then we would want to return ENOTCONN, but if the connection came up and was later dropped due to a timeout, then ETIMEDOUT should be returned. _______________________________________________ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"