- In order to better reflect that the returned pid is extracted from the

given file, serverpid sub is renamed to pidfromfile. In addition it is
  enhanced to make sure that it always returns zero unless a numerical
  positive value is returned.

- To better reflect that only process existance is actually checked,
  checkserver sub is renamed to processexists. In addition it is enhanced
  making it remove the given pid file when the extracted pid is no longer
  alive.
This commit is contained in:
Yang Tse
2009-11-30 13:48:51 +00:00
parent bfae1bd999
commit a72ce23f16
3 changed files with 43 additions and 25 deletions

View File

@@ -577,7 +577,7 @@ sub PASV_command {
my $pasvport;
my $pidf=".sockdata$ftpdnum$ext.pid";
my $prev = checkserver($pidf);
my $prev = processexists($pidf);
if($prev > 0) {
print "kill existing server: $prev\n" if($verbose);
kill(9, $prev);