Make sure there's no pidfile if we cannot start the initial sockfilt tool -

this happens for some ipv6-enabled hosts on which sockfilt cannot listen
on ipv6.
This commit is contained in:
Daniel Stenberg 2005-05-02 09:08:02 +00:00
Родитель d59d81fae8
Коммит d3eea61f1f
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -128,11 +128,12 @@ sub startsf {
open(STDOUT, ">&SFWRITE") || die "can't dup client to stdout";
}
# remove the file here so that if startsf() fails, it is very noticable
unlink(".ftp$ftpdnum.pid");
startsf();
logmsg sprintf("FTP server started on port IPv%d/$port\n",
$ipv6?6:4);
logmsg sprintf("FTP server started on port IPv%d/$port\n", $ipv6?6:4);
open(PID, ">.ftp$ftpdnum.pid");
print PID $$;
close(PID);