Package: dash
Version: 0.5.12-6
Severity: normal
X-Debbugs-Cc: msl0000023...@gmail.com


Please see the following test case:


# cat redir-stdout-test.sh 
#!/bin/sh
set -e
rm -f /tmp/empty
true > /tmp/empty
exec 1<> /tmp/empty
ls -l /proc/$$/fd/ 1>&2
# bash redir-stdout-test.sh 
total 0
lrwx------ 1 root root 64 Nov 20 05:08 0 -> /dev/pts/0
lrwx------ 1 root root 64 Nov 20 05:08 1 -> /tmp/empty
lrwx------ 1 root root 64 Nov 20 05:08 2 -> /dev/pts/0
lr-x------ 1 root root 64 Nov 20 05:08 255 -> /root/src/redir-stdout-test.sh
# dash redir-stdout-test.sh 
total 0
lrwx------ 1 root root 64 Nov 20 05:07 0 -> /dev/pts/0
lrwx------ 1 root root 64 Nov 20 05:07 1 -> /dev/pts/0
lr-x------ 1 root root 64 Nov 20 05:07 10 -> /root/src/redir-stdout-test.sh
lrwx------ 1 root root 64 Nov 20 05:07 11 -> /tmp/empty
lrwx------ 1 root root 64 Nov 20 05:07 2 -> /dev/pts/0


As the test case shows, I need to redirect stdout (file descriptor 1), but
this failed in dash(1) without any warning. The same program works in bash(1)
as expected.


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ppc64

Kernel: Linux 4.19.271-rivoreo-powerpc64-largepage (SMP w/176 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages dash depends on:
ii  debianutils  5.14
ii  dpkg         1.22.0
ii  libc6        2.37-12

dash recommends no packages.

dash suggests no packages.

-- no debconf information

Reply via email to