aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-25 23:29:27 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-25 23:29:27 +0000
commita250f8541c36dc9a7d6944fdbc0e05c21245d30b (patch)
tree008f9e560f20e623ccf6999a7e399f4465c061be
parent6727865f5f8181f36fcdabfe3817becae32fb337 (diff)
downloadiurt-a250f8541c36dc9a7d6944fdbc0e05c21245d30b.tar
iurt-a250f8541c36dc9a7d6944fdbc0e05c21245d30b.tar.gz
iurt-a250f8541c36dc9a7d6944fdbc0e05c21245d30b.tar.bz2
iurt-a250f8541c36dc9a7d6944fdbc0e05c21245d30b.tar.xz
iurt-a250f8541c36dc9a7d6944fdbc0e05c21245d30b.zip
reduce scope of a variable
-rw-r--r--lib/Iurt/Process.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Iurt/Process.pm b/lib/Iurt/Process.pm
index ac5eed2..ae10e14 100644
--- a/lib/Iurt/Process.pm
+++ b/lib/Iurt/Process.pm
@@ -247,14 +247,14 @@ sub perform_command {
my $retry = $opt{retry} || 1;
my $call_ret = 1;
- my ($err, $pid, $try);
+ my ($err, $try);
my $logfile = "$opt{log}/$opt{logname}.$run->{run}.log";
my $max_retry = max($config->{max_command_retry}, $retry);
while ($retry) {
$try++;
$logfile = "$opt{log}/$opt{logname}-$try.$run->{run}.log" if $opt{retry} > 1;
- $pid = fork_to_monitor($run, $config, $logfile, %opt) if $opt{log};
+ my $pid = $opt{log} ? fork_to_monitor($run, $config, $logfile, %opt) : 0;
eval {
# handle timeout: