httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-1.3/src/os/win32/win9xconhook Win9xConHook.c
Date Thu, 14 Dec 2000 22:24:05 GMT
wrowe       00/12/14 14:24:03

  Modified:    .        STATUS
               src      CHANGES
               src/os/win32/win9xconhook Win9xConHook.c
  Log:
    Thanks again, Andrew Braund... a little testing and sleuthing revealed
    we were trying to load kernel32.dll as we unloaded, which is badness.
  
    Right there, in my face, was the 'won't stay alive on logout' bug.
    Squashed.  So Win95/98 are working as they were in 1.3.14, only better!
  
    Happy day, time to roll once the remaining showstopper is cleaned up.
  
  Revision  Changes    Path
  1.874     +6 -13     apache-1.3/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.873
  retrieving revision 1.874
  diff -u -r1.873 -r1.874
  --- STATUS	2000/12/14 22:15:27	1.873
  +++ STATUS	2000/12/14 22:23:53	1.874
  @@ -1,5 +1,5 @@
     1.3 STATUS:
  -  Last modified at [$Date: 2000/12/14 22:15:27 $]
  +  Last modified at [$Date: 2000/12/14 22:23:53 $]
   
   Release:
   
  @@ -271,13 +271,6 @@
           See src/os/win32/monitoring-services.txt for details.
           Status: both Brian Moon and William Rowe are experimenting.
   
  -    * The recent patch to 1.3.15, adding Win9xConHook.dll to add
  -      back console windows, resolve the close button and shutdown
  -      messages on Win9x, and handle Win9x as a service broke the
  -      Win95/98 as-a-service feature, in that Apache now dies when
  -      the user logs off.  Will is happy to point any coder in the
  -      right directions.
  -
       * chdir() for CGI scripts and mod_include #exec needs to be 
         re-implemented now that CreateProcess is being used.
   
  @@ -285,12 +278,12 @@
   	- need dynamic thread creation/destruction, similar to 
   	  Unix process model
   
  -    * some errors printed by CGIs to stderr don't end up making it
  -      to the server log unless an extra debugging message is added
  -      after they run? (PR#1725 indicates this may not be just Win32)
  -
       * handle bugs that make it pop up errors on console, ie. segv 
         equiv?  Can we do this?  Need to make it robust.
  +      This is done for mod_isapi by the ap_load_dso code on win32,
  +      look there for an example ... probably not appropriate everywhere,
  +      but only where the client is affecting the state of the machine.
  +      What the operator does is a different matter.
   
       * install
   	- make installshield work
  @@ -305,7 +298,7 @@
   
       * modules that need to be made to work on win32
           - mod_example isn't multithreadreded
  -	- mod_unique_id (needs mt changes)
  +	- mod_unique_id (needs mt changes, use win32 com UUID's)
   	- mod_log_agent.c
   	- mod_log_referer.c
   	- mod_mime_magic.c (needs access to mod_mime API stage...)
  
  
  
  1.1609    +0 -7      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1608
  retrieving revision 1.1609
  diff -u -r1.1608 -r1.1609
  --- CHANGES	2000/12/14 14:30:50	1.1608
  +++ CHANGES	2000/12/14 22:24:01	1.1609
  @@ -22,13 +22,6 @@
        refresh value is not a number, ?refresh is set to 1 second.
        [William Rowe, Dirk Ahlers <there@darkride.net> PR5067]
   
  -  *) While Windows 95 and 98 may still run Apache as a 'service' in a 
  -     hidden window, the Apache Win9x service now dies when the user 
  -     logs off.  No immediate or obvious solution available, but this
  -     was a side effect of restoring 16-bit CGI processes, of which the
  -     command.com is one.  This benefits far outweighs this unfortunate
  -     side effect.  [William Rowe]
  -
     *) Restore child process consoles to correct 16-bit CGI execution
        on Windows.  Relies on Win9xConHook.dll for Win9x.  This patch
        also assures the Apache window remains titled 'Apache', rather
  
  
  
  1.6       +27 -20    apache-1.3/src/os/win32/win9xconhook/Win9xConHook.c
  
  Index: Win9xConHook.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/win32/win9xconhook/Win9xConHook.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Win9xConHook.c	2000/12/12 06:04:41	1.5
  +++ Win9xConHook.c	2000/12/14 22:24:03	1.6
  @@ -496,40 +496,47 @@
    */
   static LRESULT WINAPI RegisterWindows9xService(BOOL set_service)
   {
  -    HINSTANCE hkernel;
  -    DWORD (WINAPI *register_service_process)(DWORD, DWORD);
  +    static HINSTANCE hkernel;
  +    static DWORD (WINAPI *register_service_process)(DWORD, DWORD) = NULL;
       BOOL rv;
   
       if (set_service == is_service)
           return 1;
   
   #ifdef DBG
  -            DbgPrintf("R %s proc %8.8x as a service\r\n",
  -                      set_service ? "installing" : "removing",
  -                      GetCurrentProcessId());
  +    DbgPrintf("R %s proc %8.8x as a service\r\n",
  +              set_service ? "installing" : "removing",
  +              GetCurrentProcessId());
   #endif
   
  -    /* Obtain a handle to the kernel library */
  -    hkernel = LoadLibrary("KERNEL32.DLL");
  -    if (!hkernel)
  -        return 0;
  +    if (!register_service_process)
  +    {
  +        /* Obtain a handle to the kernel library */
  +        hkernel = LoadLibrary("KERNEL32.DLL");
  +        if (!hkernel)
  +            return 0;
       
  -    /* Find the RegisterServiceProcess function */
  -    register_service_process = (DWORD (WINAPI *)(DWORD, DWORD))
  -                     GetProcAddress(hkernel, "RegisterServiceProcess");
  -    if (register_service_process == NULL) {
  -        FreeLibrary(hkernel);
  -        return 0;
  +        /* Find the RegisterServiceProcess function */
  +        register_service_process = (DWORD (WINAPI *)(DWORD, DWORD))
  +                         GetProcAddress(hkernel, "RegisterServiceProcess");
  +        if (register_service_process == NULL) {
  +            FreeLibrary(hkernel);
  +            return 0;
  +        }
       }
  -	
  +    
       /* Register this process as a service */
  -    rv = register_service_process(0, is_service != FALSE);
  +    rv = register_service_process(0, set_service != FALSE);
       if (rv)
           is_service = set_service;
       
  -    /* Unload the kernel library */
  -    FreeLibrary(hkernel);
  -    return rv;
  +    if (!is_service)
  +    {
  +        /* Unload the kernel library */
  +        FreeLibrary(hkernel);
  +        register_service_process = NULL;
  +        return rv;
  +    }
   }
   
   
  
  
  

Mime
View raw message