3 # psize.sh -- determine this system's pipe size, and write a define to
4 # pipesize.h so ulimit.c can use it.
8 TMPFILE=$TMPDIR/$TMPNAME
10 trap 'rm -f $TMPFILE' 0 1 2 3 6 15
15 echo " * This file is automatically generated by psize.sh"
16 echo " * Do not edit!"
21 # Try to avoid tempfile races. We can't really check for the file's
22 # existance before we run psize.aux, because `test -e' is not portable,
23 # `test -h' (test for symlinks) is not portable, and `test -f' only
24 # checks for regular files
28 ./psize.aux 2>$TMPFILE | sleep 3
30 if [ -s $TMPFILE ]; then
31 echo "#define PIPESIZE `cat $TMPFILE`"
33 echo "#define PIPESIZE 512"