aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-redir
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2024-07-13 00:59:02 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2024-07-13 00:59:02 +0200
commit14e28c18ca1a0fb87b6c73d5cb7487e80bc6713a (patch)
tree5dbbdf0d23281b1409b558e26043c4895b44a6a6 /shell/hush_test/hush-redir
parent6c38d0e9da2d4a3defd2bff9f3e00f6229e9824b (diff)
downloadbusybox-w32-14e28c18ca1a0fb87b6c73d5cb7487e80bc6713a.tar.gz
busybox-w32-14e28c18ca1a0fb87b6c73d5cb7487e80bc6713a.tar.bz2
busybox-w32-14e28c18ca1a0fb87b6c73d5cb7487e80bc6713a.zip
hush: fix "exec 3>FILE" aborting if 3 is exactly the next free fd
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-redir')
-rw-r--r--shell/hush_test/hush-redir/redir_exec2.right4
-rwxr-xr-xshell/hush_test/hush-redir/redir_exec2.tests11
2 files changed, 15 insertions, 0 deletions
diff --git a/shell/hush_test/hush-redir/redir_exec2.right b/shell/hush_test/hush-redir/redir_exec2.right
new file mode 100644
index 000000000..2bdc093c9
--- /dev/null
+++ b/shell/hush_test/hush-redir/redir_exec2.right
@@ -0,0 +1,4 @@
1fd/5
2fd/4
3fd/3
4One:1
diff --git a/shell/hush_test/hush-redir/redir_exec2.tests b/shell/hush_test/hush-redir/redir_exec2.tests
new file mode 100755
index 000000000..700a51786
--- /dev/null
+++ b/shell/hush_test/hush-redir/redir_exec2.tests
@@ -0,0 +1,11 @@
1cd /proc/$$
2exec 5>/dev/null
3exec 4>/dev/null
4exec 3>/dev/null
5ls -1 fd/5
6ls -1 fd/4
7ls -1 fd/3
8exec 5>&-
9test -e fd/5 && echo BUG
10echo One:$?
11