[ClusterLabs] Antw: Coming in Pacemaker 2.0.0: Reliable exit codes
Ulrich Windl
Ulrich.Windl at rz.uni-regensburg.de
Thu Jan 11 02:59:37 EST 2018
Hi!
Will those exit code be compatible with <sysexits.h>, i.e. will it be a superset or a subset of it? If not, it would be the right time.
Regards,
Ulrich
>>> Ken Gaillot <kgaillot at redhat.com> schrieb am 10.01.2018 um 23:22 in Nachricht
<1515622941.4815.21.camel at redhat.com>:
> Every time you run a command on the command line or in a script, it
> returns an exit status. These are most useful in scripts to check for
> errors.
>
> Currently, Pacemaker daemons and command-line tools return an
> unreliable mishmash of exit status codes, sometimes including negative
> numbers (which get bitwise-remapped to the 0-255 range) and/or C
> library errno codes (which can vary across OSes).
>
> The only thing scripts could rely on was 0 means success and nonzero
> means error.
>
> Beginning with Pacemaker 2.0.0, everything will return a well-defined
> set of reliable exit status codes. These codes can be viewed using the
> existing crm_error tool using the --exit parameter. For example:
>
> crm_error --exit --list
>
> will list all possible exit statuses, and
>
> crm_error --exit 124
>
> will show a textual description of what exit status 124 means.
>
> This will mainly be of interest to users who script Pacemaker commands
> and check the return value. If your scripts rely on the current exit
> codes, you may need to update your scripts for 2.0.0.
> --
> Ken Gaillot <kgaillot at redhat.com>
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://lists.clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
More information about the Users
mailing list