aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-02 09:08:02 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-02 09:08:02 +0000
commitd3eea61f1fb487318ec7958af491e86aa821ce8b (patch)
tree6a0370e9953808a632d9c679841bf7f36059a44c
parentd59d81fae802dbb312a02e869cc76d40e5f4ab28 (diff)
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.
-rw-r--r--tests/ftpserver.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 6c8969745..3aed88b59 100644
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -128,11 +128,12 @@ sub startsf {
open(STDOUT, ">&SFWRITE") || die "can't dup client to stdout";
}
-startsf();
+# remove the file here so that if startsf() fails, it is very noticable
+unlink(".ftp$ftpdnum.pid");
-logmsg sprintf("FTP server started on port IPv%d/$port\n",
- $ipv6?6:4);
+startsf();
+logmsg sprintf("FTP server started on port IPv%d/$port\n", $ipv6?6:4);
open(PID, ">.ftp$ftpdnum.pid");
print PID $$;
close(PID);