From 69f4b018c65f8297e7e740f34788008d18e5e233 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 25 Mar 2012 23:29:19 +0000 Subject: (perform_command) simplify --- lib/Iurt/Process.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/Iurt/Process.pm') diff --git a/lib/Iurt/Process.pm b/lib/Iurt/Process.pm index 29c8d4f..2a8e90e 100644 --- a/lib/Iurt/Process.pm +++ b/lib/Iurt/Process.pm @@ -255,12 +255,8 @@ sub perform_command { while ($retry) { $try++; - if ($opt{retry} > 1) { - $logfile = "$opt{log}/$opt{logname}-$try.$run->{run}.log"; - } - if ($opt{log}) { - $pid = fork_to_monitor($run, $config, $logfile, %opt); - } + $logfile = "$opt{log}/$opt{logname}-$try.$run->{run}.log" if $opt{retry} > 1; + $pid = fork_to_monitor($run, $config, $logfile, %opt) if $opt{log}; eval { # handle timeout: -- cgit v1.2.1