Pádraig Brady wrote: > Another bug I noticed with dash-0.5.6-2.fc11.i586 > is that it doesn't redirect from symlinks correctly > for background processes. > > $ dash -c "tty < /dev/stdin&" > $ dash -c "tty < /dev/stdin" > /dev/pts/3 > $ bash -c "tty < /dev/stdin&" > /dev/pts/3 > $ dash -c "tty < $(readlink -f /dev/stdin)&" > /dev/pts/3 > > OK to apply the following?
Sure. Thanks! > Note redirecting from /dev/tty works also, > but I don't know if that's better or worse. > > --- a/tests/mv/i-3 > +++ b/tests/mv/i-3 > @@ -34,10 +34,13 @@ chmod 0 g i || framework_failure > ls /dev/stdin >/dev/null 2>&1 \ > || skip_test_ 'there is no /dev/stdin file' > > -test -r /dev/stdin 2>&1 \ > +# work around a dash bug redirecting from symlinks > +tty=$(readlink -f /dev/stdin) > + > +test -r "$tty" 2>&1 \ > || skip_test_ '/dev/stdin is not readable' > > -mv f g < /dev/stdin > out 2>&1 & pid=$! > +mv f g < $tty > out 2>&1 & pid=$! > > # Wait up to 3.1s for the expected prompt > check_overwrite_prompt()