From: Ian Jackson Subject: [OSSTEST PATCH] ts-host-ping-check: Properly append the ping output Date: Mon, 19 Oct 2015 17:14:44 +0100 Message-ID: <1445271284-21736-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZoD5K-0005BD-Vd for xen-devel@lists.xenproject.org; Mon, 19 Oct 2015 16:14:55 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- 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