HomeClusterLabs Projects

Refactor: pacemakerd: Remove some nesting in child_liveness()

Description

Refactor: pacemakerd: Remove some nesting in child_liveness()

legacy_rc was always zero (pcmk_ok) for a child that runs as root. So we
can drop that variable and limit the pcmk_daemon_user() return code
check to the non-root block.

Also, pcmk_legacy2rc() doesn't map anything to pcmk_rc_ipc_unresponsive.
So if we previously entered the "legacy_rc < 0" block, then we would
return immediately after the if-else. So now, we can go ahead and return
right after logging an error from pcmk_daemon_user().

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

Details

Provenance
nrwahl2Authored on Tue, Sep 16, 8:34 PM
Parents
rP6a054f675fbd: Refactor: pacemakerd: Rename pcmk_child_t to pcmkd_child_t
Branches
Unknown
Tags
Unknown