Closed dmik closed 1 year ago
This turns out to be a regression of commit https://github.com/bitwiseworks/libcx/commit/99f3976c3f55464be2c088c023854de98ce98695 indeed (as Silvan has found out because earlier LIBCx from 2020 worked fine here). The final else break
is obviously missing there.
There could be a number of other strange effects in applications coming out of this bug (like not reporting errors when they happen and going on as if they didn't take place).
Besides the above regression there was another one from commit https://github.com/bitwiseworks/libcx/commit/b0a2ff0324d490ec68f4f9d201d2357b0b277c5d where supplying an invalid FD to select
would make it always treat it as a dead socket after the other end's dead and hide EBADF either. Will also fix that.
@SilvanScherrer found out that LIBCx
select
override will return a positive value if a bad file descriptor is supplied to it, while in fact it should return -1 and seterrno
to EBADF. Here's the minimal test case: