Boost logo

Boost Users :

From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2021-08-24 15:21:36


On 24/08/2021 16:15, Cristian Morales Vega wrote:
> On Tue, 24 Aug 2021 at 17:25, Niall Douglas via Boost-users
> <boost-users_at_[hidden]> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net