]> xenbits.xensource.com Git - osstest.git/commitdiff
ms-queuedaemon: report-plan: Use rename-into-place for data-*.final.pl
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 17 Sep 2015 16:14:52 +0000 (17:14 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 25 Sep 2015 11:27:44 +0000 (12:27 +0100)
This means that data-projection.final.pl is never a half-written file.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
ms-queuedaemon

index 98cf5c1e01393814335d6d6fc889f7ca5f69979a..1a31284499e7af77498d578b68f68f7700caae32 100755 (executable)
@@ -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"
     }
 }