From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
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 [thread overview]
Message-ID: <1442506495-10239-1-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1442506474.18856.227.camel@citrix.com>
From: Ian Jackson <ian.jackson@eu.citrix.com>
This means that data-projection.final.pl is never a half-written file.
Signed-off-by: Ian Jackson <Ian.Jackson@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
next prev parent reply other threads:[~2015-09-17 16:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 13:07 [PATCH OSSTEST v4] ms-flights-summary: Produce an HTML report of all active flights Ian Campbell
2015-09-17 16:14 ` Ian Campbell
2015-09-17 16:14 ` Ian Campbell [this message]
2015-09-17 16:47 ` [PATCH OSSTEST 1/4] ms-queuedaemon: report-plan: Use rename-into-place for data-*.final.pl Ian Campbell
2015-09-17 16:14 ` [PATCH OSSTEST 2/4] ms-queuedaemon: Break out catching-internally Ian Campbell
2015-09-17 16:47 ` Ian Campbell
2015-09-17 16:14 ` [PATCH OSSTEST 3/4] ms-queuedaemon: Add report-projection Ian Campbell
2015-09-17 16:33 ` Ian Jackson
2015-09-17 16:39 ` Ian Campbell
2015-09-17 16:14 ` [PATCH OSSTEST 4/4] ms-queuedaemon: Call ms-flights-summary upon completed plan/projection Ian Campbell
2015-09-17 16:34 ` Ian Jackson
2015-09-18 9:02 ` [PATCH OSSTEST v4] ms-flights-summary: Produce an HTML report of all active flights Ian Campbell
2015-09-18 10:27 ` Ian Campbell
2015-09-18 11:14 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442506495-10239-1-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).