<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rc/status.c, branch master</title>
<subtitle>Byron Rakitzis' rc(1) port, with a few modifications
</subtitle>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/'/>
<entry>
<title>Revise status messages for terminated children</title>
<updated>2019-03-24T14:01:23+00:00</updated>
<author>
<name>Bert Münnich</name>
<email>ber.t@posteo.de</email>
</author>
<published>2016-07-11T20:05:18+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=592d9f333cde3f5263453c34d58c82708a91224c'/>
<id>592d9f333cde3f5263453c34d58c82708a91224c</id>
<content type='text'>
Print a status message for a terminated child if: 1) the wait builtin is called
in an interactive shell, or 2) the child terminated due to a signal and it is
not sigint and not sigpipe or it caused the child to dump core.

The messages are of the form:

    [pid:] &lt;signal message[--core dumped] | done (status)&gt;

Before this, there were various inconsistencies, e.g. the wait builtin--
regardless if called in an interactive shell or script--would print just the
pid and a colon w/o a message and w/o a newline if the child it waited for
terminated due to receiving sigint.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Print a status message for a terminated child if: 1) the wait builtin is called
in an interactive shell, or 2) the child terminated due to a signal and it is
not sigint and not sigpipe or it caused the child to dump core.

The messages are of the form:

    [pid:] &lt;signal message[--core dumped] | done (status)&gt;

Before this, there were various inconsistencies, e.g. the wait builtin--
regardless if called in an interactive shell or script--would print just the
pid and a colon w/o a message and w/o a newline if the child it waited for
terminated due to receiving sigint.
</pre>
</div>
</content>
</entry>
<entry>
<title>whitespace cleanups</title>
<updated>2018-03-26T17:20:39+00:00</updated>
<author>
<name>Toby Goodwin</name>
<email>toby@paccrat.org</email>
</author>
<published>2018-03-26T17:20:39+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=969af168ea450bf79f800da620efefa91ed1f174'/>
<id>969af168ea450bf79f800da620efefa91ed1f174</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix exit value for -e with failed backquote or pipeline</title>
<updated>2017-10-27T18:22:21+00:00</updated>
<author>
<name>Bert Münnich</name>
<email>ber.t@posteo.de</email>
</author>
<published>2017-10-27T17:30:09+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=775b775240d09fe665efaecf2432d590567e68ef'/>
<id>775b775240d09fe665efaecf2432d590567e68ef</id>
<content type='text'>
This fixes rakitzis/rc issue #40.

Both cases suffered from a misconception of statprint() in which the necessary
check for -e happens. The checked status value gets passed to statprint() as an
argument but the corresponding value passed to rc_exit() in case the status is
non-zero comes from getstatus(), which requires that the checked status is
written to statuses[] first. For pipelines this happened in the wrong order and
for backquotes the status value was not put into statuses[] at all.

Making statprint() a static helper function prevents this mistake by only
leaving the setstatus family of functions to handle status codes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes rakitzis/rc issue #40.

Both cases suffered from a misconception of statprint() in which the necessary
check for -e happens. The checked status value gets passed to statprint() as an
argument but the corresponding value passed to rc_exit() in case the status is
non-zero comes from getstatus(), which requires that the checked status is
written to statuses[] first. For pipelines this happened in the wrong order and
for backquotes the status value was not put into statuses[] at all.

Making statprint() a static helper function prevents this mistake by only
leaving the setstatus family of functions to handle status codes.
</pre>
</div>
</content>
</entry>
<entry>
<title>1999-10-12</title>
<updated>2015-05-16T20:23:16+00:00</updated>
<author>
<name>tjg</name>
<email>tjg</email>
</author>
<published>1999-10-12T14:10:22+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=84872e38eee4c7f5fec2a12563f9607e62c94219'/>
<id>84872e38eee4c7f5fec2a12563f9607e62c94219</id>
<content type='text'>
  Portability: status.c assumes traditional Unix layout of 0 and 1 exit
  statuses in the parent, which is not shared by BeOS.  Add mkstatval.c.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Portability: status.c assumes traditional Unix layout of 0 and 1 exit
  statuses in the parent, which is not shared by BeOS.  Add mkstatval.c.
</pre>
</div>
</content>
</entry>
<entry>
<title>move &lt;sys/wait.h&gt; magic into "wait.h"</title>
<updated>2015-05-16T20:23:11+00:00</updated>
<author>
<name>tgoodwin</name>
<email>tgoodwin</email>
</author>
<published>1998-07-27T13:27:34+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=7682867936110840720bc20e3a73ade7a322c375'/>
<id>7682867936110840720bc20e3a73ade7a322c375</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>only call WTERMSIG if WIFSIGNALED</title>
<updated>2015-05-16T20:23:09+00:00</updated>
<author>
<name>tgoodwin</name>
<email>tgoodwin</email>
</author>
<published>1998-07-20T10:12:46+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=096de180211a0573a80d9380aae99b940ce46a42'/>
<id>096de180211a0573a80d9380aae99b940ce46a42</id>
<content type='text'>
also, always check that WTERMSIG is in range
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
also, always check that WTERMSIG is in range
</pre>
</div>
</content>
</entry>
<entry>
<title>use POSIX wait() macros</title>
<updated>2015-05-16T20:23:05+00:00</updated>
<author>
<name>tgoodwin</name>
<email>tgoodwin</email>
</author>
<published>1998-07-07T15:08:45+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=75c6b4aaf091e76e31f69a14b29c1dfadd6c06f2'/>
<id>75c6b4aaf091e76e31f69a14b29c1dfadd6c06f2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial revision</title>
<updated>2015-05-16T20:23:05+00:00</updated>
<author>
<name>tgoodwin</name>
<email>tgoodwin</email>
</author>
<published>1998-07-07T12:26:49+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=ae927ace641cfb8f5ab95c56b77fe6746e2ed4bf'/>
<id>ae927ace641cfb8f5ab95c56b77fe6746e2ed4bf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial revision</title>
<updated>2015-05-16T20:23:00+00:00</updated>
<author>
<name>tim</name>
<email>tim</email>
</author>
<published>1997-05-14T15:30:41+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=53cf1b1c1c3f0c2b5067afccc2976b99a574a089'/>
<id>53cf1b1c1c3f0c2b5067afccc2976b99a574a089</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>beta: rc-1.5b2</title>
<updated>2015-05-16T20:22:59+00:00</updated>
<author>
<name>Toby Goodwin</name>
<email>tgoodwin@cygnus.co.uk</email>
</author>
<published>1997-07-06T23:00:01+00:00</published>
<link rel='alternate' type='text/html' href='http://src.hhvn.uk/rc/commit/?id=b87bfedf65c289bf0ee5338c9e10492b70b1e8e0'/>
<id>b87bfedf65c289bf0ee5338c9e10492b70b1e8e0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
