Hi,

we've found that ksh can fail to read file it should create with previous 
command. This occurs even when the file
creation is inside parentheses and the access occurs outside the parentheses.


Reproducer:

#!/bin/ksh

n=0
TEErc=Trcfile
while [ $n -lt 1000 ]
do
        echo $n
        >$TEErc
        (ls /tmp > /dev/null 2>&1; echo $? >$TEErc) | tee -a junk
        rc=$(<$TEErc)
        if [ -z "$rc" ]
        then
                echo hit the bug, rc is empty
                ls -l $TEErc
                sync
                sleep 1
                echo after sleep and sync
                ls -l $TEErc
                exit
        fi
        rm $TEErc
        n=$(expr $n + 1)
done
rm junk
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to