From 4d36a9a57dcd4dc93708ea348eadf161554eec45 Mon Sep 17 00:00:00 2001 From: Uriel Date: Tue, 16 Dec 2008 07:02:36 +0000 Subject: [PATCH] Make fproc more reliable (fool-proof). For some reason I have found empty files showing up in cache dirs, this should at least clean them up. --- bin/fproc_cache.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/fproc_cache.rc b/bin/fproc_cache.rc index 5a3b0eb..50bcc63 100755 --- a/bin/fproc_cache.rc +++ b/bin/fproc_cache.rc @@ -9,7 +9,7 @@ score=`{{tee $tmpfile || exit 1} | sha1sum} cachedir=/tmp/fproc_cache/$score mkdir -p $cachedir >[2]/dev/null -if(test -f $cachedir/$proc) +if(test -s $cachedir/$proc) cat $cachedir/$proc if not { $proc < $tmpfile | tee $cachedir/$pid