On Thursday 29 September 2011, Peter Rosin wrote: > Hi Stefano! > Hi Peter, thanks for the review.
> Some nits inlined... > > Cheers, > Peter > > Stefano Lattarini wrote On 2011-09-29 10:51: > > Some Korn shells, when a child process die due to signal number > > n, can leave in $? an exit status of 256+n, instead of the "more > > standard" 128+n. See also Austin Group issue 0000051: > > <http://www.austingroupbugs.net/view.php?id=51> > > > > * doc/autoconf.texi (Signal handling): Document the described Korn > > Shell behaviour, and some of its possible shortcomings. > > > > Suggestion by Eric Blake. > > --- > > ChangeLog | 14 +++++++---- > > doc/autoconf.texi | 61 > > +++++++++++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 70 insertions(+), 5 deletions(-) > > > > diff --git a/ChangeLog b/ChangeLog > > index be019f5..cb6416c 100644 > > --- a/ChangeLog > > +++ b/ChangeLog > > @@ -1,9 +1,13 @@ > > -2011-09-26 Eric Blake <[email protected]> > > - > > - docs: relax documentation license by dropping cover text > > - * doc/autoconf.texi (copying): Drop front- and back-cover texts. > > - * NEWS: Document this. > > - Reported by Brian Gough. > > +2011-09-29 Stefano Lattarini <[email protected]> > > + > > + docs: korn shells can have $? > 256 for signal-terminated children > > + Some Korn shells, when a child process die due to signal number > > + n, can leave in $? an exit status of 256+n, instead of the "more > > + standard" 128+n. See also Austin Group issue 0000051: > > Perhaps more common instead of "more standard"? Once more below. > Yes, much better, especially since we explicitly state that the ksh behaviour is standard w.r.t. POSIX. > > + <http://www.austingroupbugs.net/view.php?id=51> > > + * doc/autoconf.texi (Signal handling): Document the described Korn > > + Shell behaviour, and some of its possible shortcomings. > > + Suggestion by Eric Blake. > > > > 2011-09-13 Stefano Lattarini <[email protected]> > > > > diff --git a/doc/autoconf.texi b/doc/autoconf.texi > > index 91bb50a..2f74072 100644 > > --- a/doc/autoconf.texi > > +++ b/doc/autoconf.texi > > @@ -15610,6 +15610,67 @@ and @code{/usr/xpg4/bin/sh} will proceed to exit > > with status 130 (i.e., > > 128 + 2). In any case, if there is an active trap associated with > > @code{SIGINT}, those shells will correctly execute it. > > > > +Some Korn shells, when a child process die due receiving a signal with > > dies due to? > Consider this fixed. > > +signal number @var{n}, can leave in @samp{$?} an exit status of > > +256+@var{n} instead of the ``more standard'' 128+@var{n}. Observe the > > +difference between AT&T @code{ksh93} (2011) and @code{bash} 4.1.5 on > > +Debian: > > + > > +@example > > +$ @kbd{/bin/ksh -c 'sh -c "kill -1 \$\$"; echo $?'} > > +/bin/ksh: line 1: 7837: Hangup > > +257 > > +$ @kbd{/bin/bash -c 'sh -c "kill -1 \$\$"; echo $?'} > > +/bin/bash: line 1: 7861 Hangup (sh -c "kill -1 \$\$") > > +129 > > +@end example > > + > > +@noindent > > +This @command{ksh} behaviour is allowed by POSIX, if implemented with > > +due care; see this @uref{http://www.austingroupbugs.net/view.php?id=51, > > +Austin Group discussion} for more background. However, if it is not > > +implemented with proper care, such a behaviour might can cause problems > > "in" is missing here (between "problems" and "some"). > > and > > might or can, not both :-) > Consider these fixed as well. Thanks, Stefano
