* NEWS, src/su.c: When su receives a signal, wait for the child to

terminate (after sending a SIGTERM), and kill it only if it did
	not terminate by itself. No delay will be enforced if the child
	cooperates. See http://bugs.gentoo.org/282094
	* NEWS, man/su.1.xml: Document su's exit values.
This commit is contained in:
nekral-guest
2009-09-08 20:39:15 +00:00
parent da18e77e9a
commit 756700ddf3
4 changed files with 91 additions and 7 deletions

View File

@@ -358,6 +358,53 @@
</variablelist>
</refsect1>
<refsect1 id='exit_values'>
<title>EXIT VALUES</title>
<para>
On success, <command>su</command> returns the exit value of the
command it executed.
</para>
<para>
If this command was terminated by a signal, <command>su</command>
returns the number of this signal plus 128.
</para>
<para>
If su has to kill the command (because it was asked to terminate,
and the command did not terminate in time), <command>su</command>
returns 255.
</para>
<para>
Some exit values from <command>su</command> are independent from the
executed command:
<variablelist>
<varlistentry>
<term><replaceable>0</replaceable></term>
<listitem>
<para>success (<option>--help</option> only)</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>1</replaceable></term>
<listitem>
<para>System or authentication failure</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>126</replaceable></term>
<listitem>
<para>The requested command was not found</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable>127</replaceable></term>
<listitem>
<para>The requested command could not be executed</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 id='see_also'>
<title>SEE ALSO</title>
<para><citerefentry>