[REDIR] Move null redirect checks into caller
The null redirect checks were added as an optimisation to avoid
unnecessary memory allocations. However, we could avoid this
completely by simply making the caller avoid making a redirection
unless it is not null.
Signed-off-by: Herbert Xu
On Thu, May 13, 2010 at 11:50:17PM +, Gerrit Pape wrote:
Hi, commit 55c46b7 introduces a regression in IFS handling, see
http://bugs.debian.org/581351
To reproduce, run
$ echo a:b |src/dash -c 'IFS=: read a b; echo $a $b'
with dash built from 55c46b7^:
$ echo a:b |src/dash -c 'IFS=:
Jilles Tjoelker jil...@stack.nl wrote:
In some cases the shell executes a subshell or an external command in
the current process. This is not done if a trap on EXIT has been set, so
that that trap can execute after the subshell or external command has
finished. Extend that check to all traps.
I'm not sure how to describe this bug, but it's affected one of my
scripts, and those of several of my users. Basically, we've had loops
dieing when backgrounded programs exit. This is the simplest test case
I can come up with:
#!/bin/dash
{
echo foo
sleep 1
echo foo