From 9acd63c92cbc4bd0a3ddbb6a61e512eadc29239d Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 28 Mar 2018 18:35:07 +0200 Subject: ash,hush: fix "saved" redirected fds still visible in children Based on a patch by Mark Marshall function old new delta dup_CLOEXEC - 49 +49 fcntl_F_DUPFD 46 - -46 Signed-off-by: Denys Vlasenko --- .../ash-redir/redir_children_should_not_see_saved_fd_1.tests | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 shell/ash_test/ash-redir/redir_children_should_not_see_saved_fd_1.tests (limited to 'shell/ash_test/ash-redir/redir_children_should_not_see_saved_fd_1.tests') diff --git a/shell/ash_test/ash-redir/redir_children_should_not_see_saved_fd_1.tests b/shell/ash_test/ash-redir/redir_children_should_not_see_saved_fd_1.tests new file mode 100755 index 000000000..544c810e3 --- /dev/null +++ b/shell/ash_test/ash-redir/redir_children_should_not_see_saved_fd_1.tests @@ -0,0 +1,6 @@ +# The "find" should not see "saved" (duplicated) fd #1 +# Explicitly use bbox find, since other implementations of "find" +# may open other descriptors as well. +busybox find /proc/self/fd >tmp_$$.out +cat tmp_$$.out +rm -f tmp_$$.out -- cgit v1.2.3