Boost C++ Libraries: Ticket #4470: SHELL: fix exit-code and add 'strip-eol' option https://svn.boost.org/trac10/ticket/4470 <p> This patch applies WIFEXITED() and WEXITSTATUS() to the exit code returned by the SHELL rule when the 'exit-code' option is used. </p> <p> Without these (on Linux, at least) the exit code is left-shifted 8 bits so that an actual exit code of 1 shows up as 256 and an actual exit code of 2 shows up as 512 (etc). </p> <p> This patch also adds a new 'strip-eol' option to the SHELL rule. This causes trailing white space (most importantly, newlines) on the command's output to be removed before it's returned to the caller. Note that embedded newlines are left intact; these are needed if the user wants to echo the output and it contains multiple lines. </p> <p> Note that 'strip-eol' has no practical effect if 'no-output' is also used. </p> <p> Usage example: </p> <blockquote> <p> local foo = [ SHELL "./foo.sh" : exit-code : strip-eol ] ; </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4470 Trac 1.4.3 codemonkey@… Mon, 26 Jul 2010 21:39:35 GMT attachment set https://svn.boost.org/trac10/ticket/4470 https://svn.boost.org/trac10/ticket/4470 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">shell.patch</span> </li> </ul> Ticket anonymous Tue, 27 Jul 2010 03:34:10 GMT version changed https://svn.boost.org/trac10/ticket/4470#comment:1 https://svn.boost.org/trac10/ticket/4470#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost.Jam 3.1.17</span> → <span class="trac-field-new">Boost.Jam 3.1.16</span> </li> </ul> Ticket codemonkey@… Tue, 27 Jul 2010 03:59:07 GMT attachment set https://svn.boost.org/trac10/ticket/4470 https://svn.boost.org/trac10/ticket/4470 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">shell.2.patch</span> </li> </ul> <p> updated patch against bjam version 3.1.18 </p> Ticket anonymous Tue, 27 Jul 2010 03:59:34 GMT version changed https://svn.boost.org/trac10/ticket/4470#comment:2 https://svn.boost.org/trac10/ticket/4470#comment:2 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost.Jam 3.1.16</span> → <span class="trac-field-new">Boost.Jam 3.1.18</span> </li> </ul> Ticket codemonkey@… Tue, 27 Jul 2010 04:01:34 GMT <link>https://svn.boost.org/trac10/ticket/4470#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4470#comment:3</guid> <description> <p> Note: The original patch is against bjam version <strong> 3.1.16 </strong>. (I originally thought it was against 3.1.17 before realizing my error.) </p> <p> The new patch is against the current version, 3.1.18. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sat, 04 Sep 2010 11:42:48 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4470#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4470#comment:4</guid> <description> <p> Thanks. I've applied this patch. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sat, 04 Sep 2010 11:48:28 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4470#comment:5 https://svn.boost.org/trac10/ticket/4470#comment:5 <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> Ticket