From 3aaade794f10a7f6a00a63e9472cc316581c80c2 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 10 Sep 2025 11:14:40 +0100 Subject: shells: add tests missing from last commit --- shell/ash_test/ash-redir/redir_EINTR1.right | 2 ++ shell/ash_test/ash-redir/redir_EINTR1.tests | 13 +++++++++++++ shell/hush_test/hush-redir/redir_EINTR1.right | 2 ++ shell/hush_test/hush-redir/redir_EINTR1.tests | 13 +++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 shell/ash_test/ash-redir/redir_EINTR1.right create mode 100755 shell/ash_test/ash-redir/redir_EINTR1.tests create mode 100644 shell/hush_test/hush-redir/redir_EINTR1.right create mode 100755 shell/hush_test/hush-redir/redir_EINTR1.tests (limited to 'shell') diff --git a/shell/ash_test/ash-redir/redir_EINTR1.right b/shell/ash_test/ash-redir/redir_EINTR1.right new file mode 100644 index 000000000..287d91f67 --- /dev/null +++ b/shell/ash_test/ash-redir/redir_EINTR1.right @@ -0,0 +1,2 @@ +Hello +Done:0 diff --git a/shell/ash_test/ash-redir/redir_EINTR1.tests b/shell/ash_test/ash-redir/redir_EINTR1.tests new file mode 100755 index 000000000..cede4d4d8 --- /dev/null +++ b/shell/ash_test/ash-redir/redir_EINTR1.tests @@ -0,0 +1,13 @@ +rm -f test.fifo +mkfifo test.fifo + +(sleep 1; kill -chld $$) & +(sleep 2; echo Hello >test.fifo) & + +# We get open("test.fifo") interrupted by SIGCHLD from the first subshell. +# The shell MUST retry the open (no printing of error messages). +# Then, the second subshell opens fifo for writing and open unblocks and succeeds. +cat test.fifo) & + +# We get open("test.fifo") interrupted by SIGCHLD from the first subshell. +# The shell MUST retry the open (no printing of error messages). +# Then, the second subshell opens fifo for writing and open unblocks and succeeds. +cat