From 0be50427fb77f77d05fb59be75cd5c7bbf19a872 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Fri, 21 Jan 2011 18:50:23 +0100 Subject: [PATCH] Fix https://savannah.gnu.org/bugs/index.php?32191 --- src/parallel | 5 +++-- testsuite/tests-to-run/test50.sh | 4 ++++ testsuite/wanted-results/test50 | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 testsuite/tests-to-run/test50.sh create mode 100644 testsuite/wanted-results/test50 diff --git a/src/parallel b/src/parallel index 02198141..f5fc2fbd 100755 --- a/src/parallel +++ b/src/parallel @@ -1064,8 +1064,7 @@ sub get_job_with_sshlogin { if($::oodebug and not defined $job->{'commandline'}) { Carp::confess("get_job_with_sshlogin job->commandline should never be empty"); } - my $next_command_line = $job->replaced(); - my $clean_command = $next_command_line; + my $clean_command = $job->replaced(); if($clean_command =~ /^\s*$/) { # Do not run empty lines if(not $Global::JobQueue->empty()) { @@ -1089,6 +1088,8 @@ sub get_job_with_sshlogin { # Find another job to run my $nextjob; if(not $Global::JobQueue->empty()) { + # This can potentially recurse for all args + no warnings 'recursion'; $nextjob = get_job_with_sshlogin($sshlogin); } # Push the command back on the queue diff --git a/testsuite/tests-to-run/test50.sh b/testsuite/tests-to-run/test50.sh new file mode 100644 index 00000000..ab209bc3 --- /dev/null +++ b/testsuite/tests-to-run/test50.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +echo '### Test fix #32191' +seq 1 150 | parallel -j9 --retries 2 -S localhost,: "/bin/non-existant 2>/dev/null" diff --git a/testsuite/wanted-results/test50 b/testsuite/wanted-results/test50 new file mode 100644 index 00000000..39d38e89 --- /dev/null +++ b/testsuite/wanted-results/test50 @@ -0,0 +1 @@ +### Test fix #32191