From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1166638-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 12BF7138350
	for <garchives@archives.gentoo.org>; Thu, 30 Apr 2020 22:56:42 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 48803E0A8A;
	Thu, 30 Apr 2020 22:56:41 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 093A3E0A8A
	for <gentoo-commits@lists.gentoo.org>; Thu, 30 Apr 2020 22:56:41 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id E762C34F0BF
	for <gentoo-commits@lists.gentoo.org>; Thu, 30 Apr 2020 22:56:39 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 9FF2E1F2
	for <gentoo-commits@lists.gentoo.org>; Thu, 30 Apr 2020 22:56:38 +0000 (UTC)
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" <robbat2@gentoo.org>
Message-ID: <1588287396.ea8162cb6dde42c2c827bea7c19d7f2eee9d59fd.robbat2@gentoo>
Subject: [gentoo-commits] proj/gentoo-mirrorstats:master commit in: /
X-VCS-Repository: proj/gentoo-mirrorstats
X-VCS-Files: probe-mirmon
X-VCS-Directories: /
X-VCS-Committer: robbat2
X-VCS-Committer-Name: Robin H. Johnson
X-VCS-Revision: ea8162cb6dde42c2c827bea7c19d7f2eee9d59fd
X-VCS-Branch: master
Date: Thu, 30 Apr 2020 22:56:38 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 0e60844b-df3b-4499-a3e0-cf0ebc672945
X-Archives-Hash: 6621954fb74e579b09375e5ad94151d4

commit:     ea8162cb6dde42c2c827bea7c19d7f2eee9d59fd
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 22:56:36 2020 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 22:56:36 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-mirrorstats.git/commit/?id=ea8162cb

probe-mirmon: improve capture usage

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 probe-mirmon | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/probe-mirmon b/probe-mirmon
index cd97274..b0c3413 100755
--- a/probe-mirmon
+++ b/probe-mirmon
@@ -83,9 +83,8 @@ sub handle_rsync {
   $file =~ s/\W/_/g;    # translate all non-letters to _
 
   # https://stackoverflow.com/a/6331618/1583179
-  my $ret;
-  my ($stdout, $stderr) = capture {
-	$ret = system '/usr/bin/rsync', qw( -q --no-motd --timeout ), $timeout, $url, "$dir/$file";
+  my ($stdout, $stderr, $ret) = capture {
+      system '/usr/bin/rsync', qw( -q --no-motd --timeout ), $timeout, $url, "$dir/$file";
   };
   if ($ret!=0) {
 	#warn "rsync failed, exit code $fail, $! $? $@\n";