Subject: Re: dash: doesn't handle suspension of commands in conditional lists correctly

From: Jonathan Nieder <[email-masked]>
Date: Sat, 23 Apr 2011 17:44:53 -0500

found 288320 dash/0.5.6.1-1~exp2
clone 288320 -1
retitle -1 dash.1: please document handling of SIGTSTP in command sequences
severity -1 minor
severity 288320 wishlist
tags 288320 + confirmed
quit

Hi Larry,

Larry Doolittle wrote:

> If we wanted to send a consistent message to all Debian shell users,
> we could add to the dash BUGS section something related to the bash text
>  "Compound commands and command sequences of the form `a ; b ; c' are
>   not handled gracefully when process suspension is attempted. When a
>   process is stopped, the shell immediately executes the next command in
>   the sequence. It suffices to place the sequence of commands between
>   parentheses to force it into a subshell, which may be stopped as a unit."
> (which could be improved; it's kinda long, and doesn't mention the return
> value used in that case)

That sounds like an excellent idea.

As far as I can tell, POSIX doesn't speak to this (and an interpretation
would be nice; see http://austingroupbugs.net/ if you'd like to pursue
that).  The description of "set -m" seems to have been written with
the expectation that each command in an interactive shell is a single
pipeline.

ksh93 behaves as follows:

| ksh93$ echo hi; sleep 10; echo $?
| hi
| ^Z[1] + Stopped                  echo hi; sleep 10; echo $?
| ksh93$ fg
| echo hi; sleep 10; echo $?
| 0

mksh ignores the SIGTSTP signal.  bash and dash behave as you
describe, by continuing a compound command when one of its components
has stopped.

I'm keeping this bug as a wishlist because it would be nice to adopt
the ksh behavior.

Thanks for writing,
Jonathan

---

From: Jonathan Nieder <[email-masked]>
Date: Sat, 23 Apr 2011 17:57:36 -0500

# >> clone 288320 -1
# > Bug#288320: ash: doesn't handle suspension of commands in conditional lists correctly
# > Bug is marked as being merged with others. Use an existing clone.
#
# This again.  Documented as Bug#474742, though the description there
# has experienced scope creep. :/

# Yes, it was forwarded, but no response and it never hit the list.
notforwarded 288320
unmerge 288320
clone 288320 -1
merge 288320 288321
notforwarded -1
retitle -1 dash.1: please document handling of SIGTSTP in command sequences
severity -1 minor
tags -1 = upstream