From: Daniel Stenberg Date: Tue, 22 Feb 2011 12:28:27 +0000 (+0100) Subject: runtests.pl/stopserver: space separate pids X-Git-Tag: upstream/7.37.1~4328 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2345c1dd661c3f7deb68aaa96d7baac0373be770;p=platform%2Fupstream%2Fcurl.git 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 --- diff --git a/tests/runtests.pl b/tests/runtests.pl index d931b15..806ee98 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});