diff options
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash_test/ash-redir/redir_EINTR2.right | 2 | ||||
| -rwxr-xr-x | shell/ash_test/ash-redir/redir_EINTR2.tests | 14 | ||||
| -rw-r--r-- | shell/hush_test/hush-redir/redir_EINTR2.right | 2 | ||||
| -rwxr-xr-x | shell/hush_test/hush-redir/redir_EINTR2.tests | 14 |
4 files changed, 32 insertions, 0 deletions
diff --git a/shell/ash_test/ash-redir/redir_EINTR2.right b/shell/ash_test/ash-redir/redir_EINTR2.right new file mode 100644 index 000000000..287d91f67 --- /dev/null +++ b/shell/ash_test/ash-redir/redir_EINTR2.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | Hello | ||
| 2 | Done:0 | ||
diff --git a/shell/ash_test/ash-redir/redir_EINTR2.tests b/shell/ash_test/ash-redir/redir_EINTR2.tests new file mode 100755 index 000000000..3d343c7ea --- /dev/null +++ b/shell/ash_test/ash-redir/redir_EINTR2.tests | |||
| @@ -0,0 +1,14 @@ | |||
| 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 | read HELLO <test.fifo | ||
| 11 | echo "$HELLO" | ||
| 12 | |||
| 13 | echo "Done:$?" | ||
| 14 | rm -f test.fifo | ||
diff --git a/shell/hush_test/hush-redir/redir_EINTR2.right b/shell/hush_test/hush-redir/redir_EINTR2.right new file mode 100644 index 000000000..287d91f67 --- /dev/null +++ b/shell/hush_test/hush-redir/redir_EINTR2.right | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | Hello | ||
| 2 | Done:0 | ||
diff --git a/shell/hush_test/hush-redir/redir_EINTR2.tests b/shell/hush_test/hush-redir/redir_EINTR2.tests new file mode 100755 index 000000000..3d343c7ea --- /dev/null +++ b/shell/hush_test/hush-redir/redir_EINTR2.tests | |||
| @@ -0,0 +1,14 @@ | |||
| 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 | read HELLO <test.fifo | ||
| 11 | echo "$HELLO" | ||
| 12 | |||
| 13 | echo "Done:$?" | ||
| 14 | rm -f test.fifo | ||
