summaryrefslogtreecommitdiffhomepage
path: root/tests/zos/fdmap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zos/fdmap.sh')
-rw-r--r--tests/zos/fdmap.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/zos/fdmap.sh b/tests/zos/fdmap.sh
index c4f1679..b63a199 100644
--- a/tests/zos/fdmap.sh
+++ b/tests/zos/fdmap.sh
@@ -26,3 +26,8 @@ while [ $i -le 9 ]; do
i=$((i + 1))
done
/bin/sh -c 'echo "and closed again"'
+# The map hands the child the shell's own pipe descriptors. They are
+# close-on-exec (sys_pipe()), and spawn() keeps the flag, so a grandchild
+# that execs would lose the pipe -- ps printed EDC5113I Bad file
+# descriptor. The map must pass a duplicate without the flag.
+/bin/sh -c 'exec /bin/echo survives exec' | /bin/cat