From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH OSSTEST 1/4] ms-queuedaemon: report-plan: Use rename-into-place for data-*.final.pl Date: Thu, 17 Sep 2015 17:14:52 +0100 Message-ID: <1442506495-10239-1-git-send-email-ian.campbell@citrix.com> References: <1442506474.18856.227.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1442506474.18856.227.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org From: Ian Jackson This means that data-projection.final.pl is never a half-written file. Signed-off-by: Ian Jackson --- 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