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



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to