rm delayed?

Brian Glendenning bglenden at mandrill.cv.nrao.edu
Fri Aug 17 15:33:35 AEST 1990


Is it ever possible for a shell script snippet like the following:

touch /tmp/bad.$$
[...]
# Success
rm /tmp/bad.$$
[...]
if [ -f /tmp/bad.$$]
then
	echo failed
	exit 1
fi

To falsely report failure? This seems to be happening on our system
(convex). Is it true that if the rm succeeds it does so immediately,
or is it possible that some sort of race can be causing a false
apparent failure? I wouldn't have thought so, but I can't quite see
where else the script might be going wrong. Thanks!
--
       Brian Glendenning - National Radio Astronomy Observatory
bglenden at nrao.edu          bglenden at nrao.bitnet          (804) 296-0286



More information about the Comp.unix.questions mailing list