mirror of
https://github.com/curl/curl.git
synced 2026-08-24 13:03:35 +03:00
The hash of running servers is now a hash of hashes which for each running
server holds not only its two main pids, but also the pidfile of the test server and the 'slavepidfiles' for ftp* servers. This allows a better control when stopping servers. Now from runtests.pl when test servers are stopped they are signalled in sequence TERM, INT and KILL allowing time in between for them to die. This will give us a chance of gracefully stopping test servers, which we didn't have when we were killing them in first instance.
This commit is contained in:
parent
b8039a821b
commit
74ddbd8a3b
3 changed files with 525 additions and 173 deletions
|
|
@ -114,7 +114,7 @@ do {
|
|||
sub catch_zap {
|
||||
my $signame = shift;
|
||||
print STDERR "ftpserver.pl received SIG$signame, exiting\n";
|
||||
ftpkillslaves(1);
|
||||
ftpkillslaves();
|
||||
die "Somebody sent me a SIG$signame";
|
||||
}
|
||||
$SIG{INT} = \&catch_zap;
|
||||
|
|
@ -523,7 +523,7 @@ sub PASV_command {
|
|||
my $pasvport;
|
||||
my $pidf=".sockdata$ftpdnum$ext.pid";
|
||||
|
||||
my $prev = checkserver($pidf);
|
||||
my $prev = checkalivepidfile($pidf);
|
||||
if($prev > 0) {
|
||||
print "kill existing server: $prev\n" if($verbose);
|
||||
kill(9, $prev);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue