<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Hey devs,<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
I noticed there was a change in exit code from <code>crmadmin --version</code> from version 2.0.4 to 2.0.5, I run this command in a script which checks
<code>if [[ 0 -ne $? ]]; then ....</code> which is how I noticed the change.<br>
<br>
In 2.0.4, crmadmin would exit with 0, while in 2.0.5 it will exit with 64. Ran this through gdb quick as well and here are the respective traces.<br>
<br>
<b>Pacemaker 2.0.4</b><br>
<div>Thread 1 (Thread 0x7ffff7fc9b80 (LWP 3423363)):</div>
<div>#0 0x00007ffff5190c20 in exit () from /lib64/libc.so.6</div>
<div>#1 0x00007ffff70c00b4 in crm_exit (rc=rc@entry=CRM_EX_OK) at results.c:773</div>
<div>#2 0x00007ffff70b63f6 in pcmk__cli_help (cmd=<optimized out>, exit_code=CRM_EX_OK) at options.c:263</div>
<div>#3 0x0000555555556084 in main (argc=2, argv=0x7fffffffd738) at crmadmin.c:183</div>
<div><br>
</div>
<div><br>
</div>
<div><b>Pacemaker 2.0.5</b><br>
</div>
<div>Thread 1 (Thread 0x7ffff7fd6b80 (LWP 2880544)):</div>
<div>#0 0x00007ffff5184c20 in exit () from /lib64/libc.so.6</div>
<div>#1 0x00007ffff70be6e4 in crm_exit (rc=rc@entry=CRM_EX_USAGE) at results.c:781</div>
<div>#2 0x00007ffff70aed96 in pcmk__cli_help (cmd=<optimized out>, exit_code=CRM_EX_USAGE) at options.c:264</div>
#3 0x00005555555563d5 in main (argc=2, argv=0x7fffffffe058) at crmadmin.c:426<br>
<br>
I am wondering if this change was intentional, or a bug introduced by some other change. I believe its a bug since crmadmin -h still exits with 0.<br>
<br>
Gerry Sommerville<br>
</div>
</body>
</html>