HomeClusterLabs Projects

Refactor: libcrmcommon: functionize crm_abort() better

Description

Refactor: libcrmcommon: functionize crm_abort() better

crm_abort() has three modes of operation:

  • If the do_fork argument is false, abort
  • Otherwise if the do_core argument is true, abort if not a daemon, or fork a child that aborts (and continue after the child is done) if a daemon
  • Otherwise just log an error

This commit puts each in its own function. This helps readability, allows us to
mark the first mode function as not returning (the other two modes can), and
will make it easier to deprecate crm_abort() later.

Details

Provenance
kgaillotAuthored on Apr 6 2021, 5:09 PM
Parents
rP688134d4a2a9: API: libcrmcommon: deprecate crm_hash_table_size()
Branches
Unknown
Tags
Unknown

Event Timeline