[Nottingham] named pipes (fifo) help please
Martin
martin at ml1.co.uk
Wed Oct 26 17:15:05 BST 2005
Martin Garton wrote:
[---]
> If on the same filesystem, mv uses rename(2) which is atomic for file
> replacement. (because you are not actually moving any data. the inode is
> not changed, just the link)
OK, so:
Process1:
while true
do
( date -R ; echo "Whatever status results" ) >footmp.txt
mv footmp.txt foo.txt
sleep 1
done
Process2:
while true
do
cat foo.txt
sleep 0.25
done
Is the "mv" still atomic even though the old file is getting deleted?
(No partial writes noticed despite the coincident read-writes.)
Will this all be cached in RAM by the kernel or will my HDD get
thrashed?? (Seems to work ok and the HDD gets hit only occasionally, so
the changes must be getting cached.)
Meanwhile, I'm having a quick look at sockets from bash as suggested.
Cheers,
Martin
--
----------------
Martin Lomas
martin at ml1.co.uk
----------------
More information about the Nottingham
mailing list