aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-02-22 13:28:27 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-02-22 13:42:00 +0100
commit2345c1dd661c3f7deb68aaa96d7baac0373be770 (patch)
tree07d454ee76b8ddc5d1cb7ee6270f919d6ef47130
parent7aa2d10e0db82a55eba6b5723307d915939cb2fb (diff)
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
-rwxr-xr-xtests/runtests.pl4
1 files changed, 3 insertions, 1 deletions
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});