From: Ian Jackson <ian.jack...@eu.citrix.com>

This means that data-projection.final.pl is never a half-written file.

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 ms-queuedaemon | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ms-queuedaemon b/ms-queuedaemon
index 98cf5c1..1a31284 100755
--- a/ms-queuedaemon
+++ b/ms-queuedaemon
@@ -294,7 +294,9 @@ proc report-plan {w wo} {
     } emsg]} {
         log "INTERNAL ERROR showing $w html: $emsg"
     } else {
-       file copy -force data-$w.pl data-$wo.final.pl
+       set out data-$wo.final.pl
+       file copy -force data-$w.pl $out.new
+       file rename -force $out.new $out
         log "$w report-plan OK"
     }
 }
-- 
2.5.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to