Scan for 'stunnel4' before 'stunnel' since debian have them setup this way

and it should break most other systems. The "funny" part is that debian
actually have a 'stunnel' setup to simulate stunnel v3 but it breaks our own
stunnel-version-detect-and-adjust-to-it system.

Added initial support for optionally running servers with fork support.
This commit is contained in:
Daniel Stenberg 2006-04-10 13:03:20 +00:00
parent 4edb93508d
commit e174d374f2
1 changed files with 11 additions and 2 deletions

View File

@ -93,10 +93,11 @@ my $memdump="$LOGDIR/memdump";
# the path to the script that analyzes the memory debug output file: # the path to the script that analyzes the memory debug output file:
my $memanalyze="./memanalyze.pl"; my $memanalyze="./memanalyze.pl";
my $stunnel = checkcmd("stunnel"); my $stunnel = checkcmd("stunnel4") || checkcmd("stunnel");
my $valgrind = checkcmd("valgrind"); my $valgrind = checkcmd("valgrind");
my $valgrind_logfile="--logfile"; my $valgrind_logfile="--logfile";
my $start; my $start;
my $forkserver=0;
my $valgrind_tool; my $valgrind_tool;
if($valgrind) { if($valgrind) {
@ -531,6 +532,7 @@ sub runhttpserver {
my $port = $HTTPPORT; my $port = $HTTPPORT;
my $ip = $HOSTIP; my $ip = $HOSTIP;
my $nameext; my $nameext;
my $fork = $forkserver?"--fork":"";
if($ipv6) { if($ipv6) {
# if IPv6, use a different setup # if IPv6, use a different setup
@ -552,7 +554,7 @@ sub runhttpserver {
$flag .= "-d \"$dir\" "; $flag .= "-d \"$dir\" ";
} }
my $cmd="$perl $srcdir/httpserver.pl -p $pidfile $flag $port $ipv6"; my $cmd="$perl $srcdir/httpserver.pl -p $pidfile $fork$flag $port $ipv6";
my ($httppid, $pid2) = my ($httppid, $pid2) =
startnew($cmd, $pidfile); # start the server in a new process startnew($cmd, $pidfile); # start the server in a new process
@ -1901,6 +1903,7 @@ sub startservers {
} }
else { else {
warn "we don't support a server for $what"; warn "we don't support a server for $what";
return "no server for $what";
} }
} }
return 0; return 0;
@ -1957,6 +1960,12 @@ do {
# have the servers display protocol output # have the servers display protocol output
$debugprotocol=1; $debugprotocol=1;
} }
elsif ($ARGV[0] eq "-f") {
# run fork-servers, which makes the server fork for all new
# connections This is NOT what you wanna do without knowing exactly
# why and for what
$forkserver=1;
}
elsif ($ARGV[0] eq "-g") { elsif ($ARGV[0] eq "-g") {
# run this test with gdb # run this test with gdb
$gdbthis=1; $gdbthis=1;