* [OSSTEST PATCH] ts-host-ping-check: Properly append the ping output
@ 2015-10-19 16:14 Ian Jackson
2015-10-20 9:08 ` Ian Campbell
0 siblings, 1 reply; 2+ messages in thread
From: Ian Jackson @ 2015-10-19 16:14 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell
On Linux opening /dev/stderr produces a non-O_APPEND open-file, with
its own file position pointer, even if stderr was opened O_APPEND.
As a result the logfile from this step would be mangled. So use
`tee -a'.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
ts-host-ping-check | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ts-host-ping-check b/ts-host-ping-check
index ca8920c..f10e73c 100755
--- a/ts-host-ping-check
+++ b/ts-host-ping-check
@@ -28,7 +28,7 @@ our $ho= selecthost($whhost);
exit 0 if $ho->{SharedReady};
-$_ = `ping -D -i 0.2 -c 100 $ho->{Ip} | tee /dev/stderr`;
+$_ = `ping -D -i 0.2 -c 100 $ho->{Ip} | tee -a /dev/stderr`;
m/\b([0-9.]+)% packet loss\b/ or die "$_ ?";
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [OSSTEST PATCH] ts-host-ping-check: Properly append the ping output
2015-10-19 16:14 [OSSTEST PATCH] ts-host-ping-check: Properly append the ping output Ian Jackson
@ 2015-10-20 9:08 ` Ian Campbell
0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2015-10-20 9:08 UTC (permalink / raw)
To: Ian Jackson, xen-devel
On Mon, 2015-10-19 at 17:14 +0100, Ian Jackson wrote:
> On Linux opening /dev/stderr produces a non-O_APPEND open-file, with
> its own file position pointer, even if stderr was opened O_APPEND.
>
> As a result the logfile from this step would be mangled. So use
> `tee -a'.
>
> Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-20 9:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 16:14 [OSSTEST PATCH] ts-host-ping-check: Properly append the ping output Ian Jackson
2015-10-20 9:08 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.