HomeClusterLabs Projects

Refactor: tools: Remove direct calls to crm_perror.

Description

Refactor: tools: Remove direct calls to crm_perror.

Daemons are detached from the console, so no one's going to see their
stderr anyway. In all these cases, we should just call pcmk_rc_err on
errno to log the error. This adds a little more context to what went
wrong.

Additionally, I've changed the return type of the internal
bind_and_listen function to return -errno just in case the caller is
ever interested in that. It's more useful than just returning a -1
everywhere. On the other hand, I've left init_remote_listener alone
because its error checking isn't great in the first place and could
really use a more thorough overhaul.

Fixes T170

Details

Provenance
clumensAuthored on Aug 31 2023, 1:07 PM
Parents
rPcbb7c42db730: Refactor: Remove unnecessary calls to pcmk_strerror.
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task