From 2345c1dd661c3f7deb68aaa96d7baac0373be770 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 22 Feb 2011 13:28:27 +0100 Subject: runtests.pl/stopserver: space separate pids The stopserver function would append pids to kill and could append them without separating them with space properly. The result would be a very large number that by (some implementations of) kill would be interpreted as a negative number and that process group would be wiped... Bug: http://curl.haxx.se/bug/view.cgi?id=3188836 Reported by: Greg Pratt --- tests/runtests.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index d931b15b4..806ee986d 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -651,7 +651,9 @@ sub stopserver { # foreach my $server (@killservers) { if($run{$server}) { - $pidlist .= "$run{$server} "; + # we must prepend a space since $pidlist may already contain + # a pid + $pidlist .= " $run{$server}"; $run{$server} = 0; } $runcert{$server} = 0 if($runcert{$server}); -- cgit v1.2.3