Test harness process control enhancements
This commit is contained in:
parent
044ba6dad2
commit
002ed5f298
@ -85,7 +85,11 @@ sub killpid {
|
||||
# stop it, otherwise reap it if this has not been done yet.
|
||||
my @signalled;
|
||||
my $prev = 0;
|
||||
my @pids = sort({$a <=> $b} split(/\s+/, $pidlist));
|
||||
my @pids = split(' ', $pidlist);
|
||||
if(scalar(@pids) > 2) {
|
||||
my @sorted = sort({$a <=> $b} @pids);
|
||||
@pids = @sorted;
|
||||
}
|
||||
foreach my $tmp (@pids) {
|
||||
chomp $tmp;
|
||||
if($tmp =~ /^(\d+)$/) {
|
||||
|
@ -2518,7 +2518,7 @@ sub stopservers {
|
||||
my $pid;
|
||||
my $prev;
|
||||
|
||||
foreach $pid (split(/\s+/, $pids)) {
|
||||
foreach $pid (split(' ', $pids)) {
|
||||
if($pid != $prev) {
|
||||
# no need to kill same pid twice!
|
||||
logmsg sprintf("* kill pid for %s => %d\n",
|
||||
|
@ -927,7 +927,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
|
||||
logmsg("Sent off %zd bytes", written);
|
||||
}
|
||||
/* write to file as well */
|
||||
fwrite(buffer, 1, written, dump);
|
||||
fwrite(buffer, 1, (size_t)written, dump);
|
||||
if(got_exit_signal)
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user