1 |
commit: ea8162cb6dde42c2c827bea7c19d7f2eee9d59fd |
2 |
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 30 22:56:36 2020 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 30 22:56:36 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoo-mirrorstats.git/commit/?id=ea8162cb |
7 |
|
8 |
probe-mirmon: improve capture usage |
9 |
|
10 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
11 |
|
12 |
probe-mirmon | 5 ++--- |
13 |
1 file changed, 2 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/probe-mirmon b/probe-mirmon |
16 |
index cd97274..b0c3413 100755 |
17 |
--- a/probe-mirmon |
18 |
+++ b/probe-mirmon |
19 |
@@ -83,9 +83,8 @@ sub handle_rsync { |
20 |
$file =~ s/\W/_/g; # translate all non-letters to _ |
21 |
|
22 |
# https://stackoverflow.com/a/6331618/1583179 |
23 |
- my $ret; |
24 |
- my ($stdout, $stderr) = capture { |
25 |
- $ret = system '/usr/bin/rsync', qw( -q --no-motd --timeout ), $timeout, $url, "$dir/$file"; |
26 |
+ my ($stdout, $stderr, $ret) = capture { |
27 |
+ system '/usr/bin/rsync', qw( -q --no-motd --timeout ), $timeout, $url, "$dir/$file"; |
28 |
}; |
29 |
if ($ret!=0) { |
30 |
#warn "rsync failed, exit code $fail, $! $? $@\n"; |