From 2ca714a58e63440631e713241c000f87602fac24 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 19 Jul 2015 03:07:48 +0200 Subject: [PATCH] Fixed bug #45575: -m and multiple hosts repeats first args. --- src/parallel | 1 + testsuite/tests-to-run/parallel-local-ssh4.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/parallel b/src/parallel index 010832c6..0f7b472e 100755 --- a/src/parallel +++ b/src/parallel @@ -4777,6 +4777,7 @@ sub compute_number_of_processes { } # Cleanup: Unget the command_lines or the @args $Global::JobQueue->{'commandlinequeue'}->{'arg_queue'}->unget(@args); + @args = undef; $Global::JobQueue->unget(@jobs); @jobs = undef; } diff --git a/testsuite/tests-to-run/parallel-local-ssh4.sh b/testsuite/tests-to-run/parallel-local-ssh4.sh index cff2bac8..5f028ec8 100644 --- a/testsuite/tests-to-run/parallel-local-ssh4.sh +++ b/testsuite/tests-to-run/parallel-local-ssh4.sh @@ -61,6 +61,9 @@ echo '### bug #44371: --trc with csh complains' echo '### bug #44143: csh and nice' parallel --nice 1 -S csh@lo setenv B {}\; echo '$B' ::: OK +echo '### bug #45575: -m and multiple hosts repeats first args' + seq 1 3 | parallel -X -S 2/lo,2/: -k echo + EOF echo