cURL / Mailing Lists / curl-users / Single Mail

curl-users

bug in runtests.pl ?

From: Roth, Kevin P. <KPRoth_at_MarathonOil.com>
Date: Wed, 10 Oct 2001 14:08:26 -0400

in runtests.pl:checkserver(), it isn't successfully realizing when I
have another instance of httpserver.pl already running. It appears
you've got an extraneous "my" in there. Changing as follows seems to fix
it fine:

>>>>>>>>>>>>
    # check for pidfile
    if ( -f $pidfile ) {
        my $PID=serverpid($pidfile);
        if ($PID ne "" && kill(0, $PID)) {
            $RUNNING=1;
----- changes to -----
    # check for pidfile
    if ( -f $pidfile ) {
        $PID=serverpid($pidfile);
        if ($PID ne "" && kill(0, $PID)) {
            $RUNNING=1;
<<<<<<<<<<<

Also, it seems (to me), if runtests.pl support the ability to not start
httpserver if it's already running, then it should also support the
ability to not kill that instance of httpserver (since it didn't start
it). I don't see that anywhere... I assume something would have to be
added to runhttpserver() to "remember" whether runtests.pl started it,
and then something would have to be added stopserver() to take action on
that.

--Kevin
Received on 2001-10-10