[PATCH 1/2] [REDIR] Move null redirect checks into caller

2010-05-27 Thread Herbert Xu
[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

Re: IFS regression in 55c46b7

2010-05-27 Thread 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=:

Re: [PATCH] [EVAL] Force fork if any trap is set, not just on EXIT.

2010-05-27 Thread Herbert Xu
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.

Job control bug in revision 3800d4934391b,

2010-05-27 Thread Kris Maglione
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