httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank J. Faubert, Jr." <fr...@sane.com>
Subject NT BUG: Problem in master_main
Date Thu, 13 Nov 1997 22:14:45 GMT
Hi,

    I found a problem in master_main where a for loop would never end
because the "tmstart" and "time(NULL)" were in the wrong place.  The
following patch fixes it.  This should solve the problem where apache takes
a long time to terminate as a Windows NT Service.

-Frank

*** http_main.c.orig    Thu Nov 13 17:05:33 1997
--- http_main.c Thu Nov 13 17:07:13 1997
***************
*** 4250,4256 ****
        SetEvent(ev[i]);
      }
!     for (tmstart = time(NULL); nchild && (tmstart < (time(NULL) + 60));) {
        service_set_status(SERVICE_STOP_PENDING);
        rv = WaitForMultipleObjects(nchild, (HANDLE *) child, FALSE, 2000);
        ap_assert(rv != WAIT_FAILED);
--- 4250,4256 ----
        SetEvent(ev[i]);
      }
!     for (tmstart = time(NULL); nchild && (time(NULL) < (tmstart + 60));) {
        service_set_status(SERVICE_STOP_PENDING);
        rv = WaitForMultipleObjects(nchild, (HANDLE *) child, FALSE, 2000);
        ap_assert(rv != WAIT_FAILED);


Mime
View raw message