On 24/08/2021 16:15, Cristian Morales Vega wrote:
On Tue, 24 Aug 2021 at 17:25, Niall Douglas via Boost-users
wrote: In proposed status_code we supply a getaddrinfo_code, so getaddrinfo codes get their own status code domain. EAI_SYSTEM compares equal to errc::resource_unavailable_try_again:
Not sure how I feel about that.
I also have just noticed that while POSIX says "[EAI_SYSTEM] A system error occurred; the error code can be found in errno.", which IMHO clearly says errno must be != 0, https://man7.org/linux/man-pages/man3/getaddrinfo.3.html says "EAI_SYSTEM Other system error, check errno for details.". I guess the later could accept errno == 0, meaning "no details".
Ah nice bug catch. I've logged it to https://github.com/ned14/status-code/issues/34. Once fixed, we'll also carry errno as payload, and if getaddrinfo returned EAI_SYSTEM, then getaddrinfo_code will present its errno for comparison instead (status_code allows arbitrary payloads,so this is easy). Niall