diff options
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash_test/ash-redir/redir_EINTR1.right | 2 | ||||
| -rwxr-xr-x | shell/ash_test/ash-redir/redir_EINTR1.tests | 13 | ||||
| -rw-r--r-- | shell/hush_test/hush-redir/redir_EINTR1.right | 2 | ||||
| -rwxr-xr-x | shell/hush_test/hush-redir/redir_EINTR1.tests | 13 |
4 files changed, 30 insertions, 0 deletions
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 @@ | |||
| 1 | Hello | ||
| 2 | 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 @@ | |||
| 1 | rm -f test.fifo | ||
| 2 | mkfifo test.fifo | ||
| 3 | |||
| 4 | (sleep 1; kill -chld $$) & | ||
| 5 | (sleep 2; echo Hello >test.fifo) & | ||
| 6 | |||
| 7 | # We get open("test.fifo") interrupted by SIGCHLD from the first subshell. | ||
| 8 | # The shell MUST retry the open (no printing of error messages). | ||
| 9 | # Then, the second subshell opens fifo for writing and open unblocks and succeeds. | ||
| 10 | cat <test.fifo | ||
| 11 | |||
| 12 | echo "Done:$?" | ||
| 13 | rm -f test.fifo | ||
diff --git a/shell/hush_test/hush-redir/redir_EINTR1.right b/shell/hush_test/hush-redir/redir_EINTR1.right new file mode 100644 index 000000000..287d91f67 --- /dev/null +++ b/shell/hush_test/hush-redir/redir_EINTR1.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | Hello | ||
| 2 | Done:0 | ||
diff --git a/shell/hush_test/hush-redir/redir_EINTR1.tests b/shell/hush_test/hush-redir/redir_EINTR1.tests new file mode 100755 index 000000000..cede4d4d8 --- /dev/null +++ b/shell/hush_test/hush-redir/redir_EINTR1.tests | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | rm -f test.fifo | ||
| 2 | mkfifo test.fifo | ||
| 3 | |||
| 4 | (sleep 1; kill -chld $$) & | ||
| 5 | (sleep 2; echo Hello >test.fifo) & | ||
| 6 | |||
| 7 | # We get open("test.fifo") interrupted by SIGCHLD from the first subshell. | ||
| 8 | # The shell MUST retry the open (no printing of error messages). | ||
| 9 | # Then, the second subshell opens fifo for writing and open unblocks and succeeds. | ||
| 10 | cat <test.fifo | ||
| 11 | |||
| 12 | echo "Done:$?" | ||
| 13 | rm -f test.fifo | ||
