You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Pierpaolo Fumagalli <ia...@iname.com> on 1998/06/18 20:15:16 UTC
os-windows/2467: Windows/Linux startup/shutdown different behaviour
>Number: 2467
>Category: os-windows
>Synopsis: Windows/Linux startup/shutdown different behaviour
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Thu Jun 18 11:20:01 PDT 1998
>Last-Modified:
>Originator: ianosh@iname.com
>Organization:
apache
>Release: 1.3.0 and prev.
>Environment:
OS-1: Ms Windows NT 4.0 Wks w/ SP3 (Arch. Double PPro 200)
OS-2: Linux 2.0.33 w/ libc5 Slackware Distr. (Arch. Single PPro 200)
Administrator privileges under NT, Root under Linux
>Description:
During Startup and Shutdown, when Apache initializes modules, he works differently under Win32 and Linux.
My module has only 2 functions: module_init(...) and module_cleanup(...).
In module_init() I placed a call to ap_register_cleanup(...) for module_cleanup(). Il both modules I added a log call via ap_log_error(...) and my own log via fopen(...) fprintf(...) fclose(...).
Under Linux everything works right, when I look at error log I see the calls to mod_init(), mod_cleanup() two times, one of the first startup procedure (call it "Defensive Programming" -said Brian- ) and one for the actual -running- startup.
Under Win32 the log says:
mod_init() called
mod_init() called
mod_init() called
three times (yes) with no cleanup... under my own log I see:
mod_init() called
mod_cleanup() called
mod_init() called
mod_init() called
so three inits and 1 cleanup (after first startup) and NOT a final cleanup when server shutdowns.
>How-To-Repeat:
Alwais on Win32 machines (I tried also on a couple of other machines).
>Fix:
I'm looking around master_main() and service_main() under http_main.c... and code reflects logs...
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]