]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/test1.sub
bash-5.0 distribution sources and documentation
[thirdparty/bash.git] / tests / test1.sub
CommitLineData
d233b485
CR
1# some systems, like old SunOS, have stat on /dev/fd/N and fstat(N, ...)
2# return different results
3: ${TMPDIR:=/tmp}
4
5trap 'rm -f ${TMPDIR}/pipe' 0 1 2 3 6 15
6
7exec 6>&-
8echo "t -p /dev/fd/6"
9test -p /dev/fd/6
10echo $?
11
12rm -f ${TMPDIR}/pipe 2>/dev/null
13mkfifo ${TMPDIR}/pipe
14cat < ${TMPDIR}/pipe &
15exec 6>&-
16exec 6>${TMPDIR}/pipe
17echo "t -p /dev/fd/6"
18test -p /dev/fd/6
19echo $?
20exec 2>/dev/null # disable process termination message
21kill $! 2>/dev/null