Boost C++ Libraries: Ticket #5329: Example program first.cpp returns code 1 in case when program called with "--help" option https://svn.boost.org/trac10/ticket/5329 <p> Hello, </p> <p> first.cpp example at trunk/libs/program_options/example/first.cpp contains following code at line 30 (<a class="changeset" href="https://svn.boost.org/trac10/changeset/70076" title="Chrono: #5322, #5323, time_point operators ++,--">r70076</a>): </p> <pre class="wiki"> if (vm.count("help")) { cout &lt;&lt; desc &lt;&lt; "\n"; return 1; } </pre><p> That means that program will return non-zero code when called as "./program --help", which usually mean incorrect program termination. </p> <p> I think outputting help message is a correct program behavior and there should be returned zero code: "return 0". </p> <p> Best regards, Vladimir Rutsky </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5329 Trac 1.4.3 Vladimir Prus Thu, 17 Mar 2011 21:25:20 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5329#comment:1 https://svn.boost.org/trac10/ticket/5329#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/70079" title="Return 0, not 1, when --help is passed. Fixes #5329. ">[70079]</a>) Return 0, not 1, when --help is passed. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5329" title="#5329: Bugs: Example program first.cpp returns code 1 in case when program called ... (closed: fixed)">#5329</a>. </p> Ticket