HomeClusterLabs Projects

Low: libcrmcommon: Catch correct errors for remote connection sockets

Description

Low: libcrmcommon: Catch correct errors for remote connection sockets

connect() can be interrupted by a signal, and we can treat that the same
as EAGAIN.

select() doesn't set errno to EINPROGRESS, but it can set EINTR.

read() and write() can set EWOULDBLOCK, which is not guaranteed to have
the same value as EAGAIN. However, it might (and in fact it does on my
system), which causes a compiler error ("duplicate case value") if we
use a switch statement for those two cases.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Thu, Jan 9, 1:49 AM
Parents
rPc120c1ebbcb6: Low: various: Correct some printf specifiers
Branches
Unknown
Tags
Unknown