ref: 36755242a6d7fd8b87b1209c1f5c0614b5510d6b
parent: f50734a6f5ebd1c9f08e09d417d9cd4737187661
author: sl <[email protected]>
date: Tue Dec 16 02:02:36 EST 2008
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.
--- a/bin/fproc_cache.rc
+++ b/bin/fproc_cache.rc
@@ -9,7 +9,7 @@
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