Your message dated Mon, 20 Nov 2023 14:58:17 +0800
with message-id
<capge7ycqnchp8a78_ggn6dr_puk_1__yasqzmvjbgzalk8p...@mail.gmail.com>
and subject line Closing
has caused the Debian Bug report #1056296,
regarding dash: redirecting stdout for current shell via 'exec' command didn't
work correctly
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1056296: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056296
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dash
Version: 0.5.12-6
Severity: normal
X-Debbugs-Cc: [email protected]
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
--- End Message ---
--- Begin Message ---
With further investigations, this apparent issue didn't casue real problem in
shell scripts. The newly opened bug #1056297 was the real cause.
--- End Message ---