| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# Test with all of stdin, stdout, stderr open. |
| 4 |
${CHECKER} ./test-xstdopen${EXEEXT} || exit 1 |
| 5 |
|
| 6 |
# The syntax for closed file descriptors in sh scripts is specified by POSIX in |
| 7 |
# section 2.7.5 of |
| 8 |
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html |
| 9 |
|
| 10 |
# Test with stdin closed. |
| 11 |
${CHECKER} ./test-xstdopen${EXEEXT} <&- || exit 1 |
| 12 |
|
| 13 |
# Test with stdout closed. |
| 14 |
${CHECKER} ./test-xstdopen${EXEEXT} >&- || exit 1 |
| 15 |
|
| 16 |
# Test with stderr closed. |
| 17 |
${CHECKER} ./test-xstdopen${EXEEXT} 2>&- || exit 1 |
| 18 |
|
| 19 |
# Test with all of stdin, stdout, stderr closed. |
| 20 |
${CHECKER} ./test-xstdopen${EXEEXT} <&- >&- 2>&- || exit 1 |