httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apachen/src/main http_main.c
Date Tue, 13 Jan 1998 21:19:11 GMT
dgaudet     98/01/13 13:19:11

  Modified:    .        STATUS
               src      CHANGES
               src/main http_main.c
  Log:
  Brian says:
  
  This patch cleans up some problems with termination in OS/2.
  There are two issues fixed here:
  
  1) Fixes the 'kill process tree' signal. Before this fix the children were
  only being killed after the first time out causing lots of warnings in the
  error log.
  
  2) Allows a Ctrl-C to be used to cleanly shut down the server by
          a) Catching SIGINT and treating it like a SIGTERM
          b) Ensuring the SIGINT is sent to the parent process
  
  Submitted by:	Brian Havard <brianh@kheldar.apana.org.au>
  Reviewed by:	Dean Gaudet, Jim Jagielski
  
  Revision  Changes    Path
  1.81      +1 -4      apachen/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /export/home/cvs/apachen/STATUS,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- STATUS	1998/01/13 16:20:35	1.80
  +++ STATUS	1998/01/13 21:19:06	1.81
  @@ -77,6 +77,7 @@
       * Doug's [PATCH] add -c and -C switches (take 3)
       * Paul's WIN32: patch to allow for Doug's -c option
       * Dean's [PATCH] unneeded pstrdup()s (in table_*() calls)
  +    * Brian Havard's [Patch] OS/2 - fix up shut down
   
   Available Patches:
   
  @@ -101,10 +102,6 @@
       * Dean's [PATCH] yet another slow function
           <Pine.LNX.3.95dg3.980106142612.1054W-100000@twinlark.arctic.org>
   	Status: Dean +1, Jim +1, Martin +1, Paul +1
  -
  -    * Brian Havard's [Patch] OS/2 - fix up shut down
  -	<199801051625.DAA25173@silk.apana.org.au>
  -	Status: Dean +1, Jim +1
   
       * Martin's [PATCH] mod_speling [300] Multiple Choices bug (Take 2)
   	Submitted by: Soeren Ziehe <ROBINTON@AMTRASH.comlink.de>
  
  
  
  1.564     +4 -1      apachen/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.563
  retrieving revision 1.564
  diff -u -r1.563 -r1.564
  --- CHANGES	1998/01/11 20:55:16	1.563
  +++ CHANGES	1998/01/13 21:19:07	1.564
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3b4
   
  +  *) PORT: Fix problem killing children when terminating.  Allow ^C
  +     to shut down the server.  [Brian Havard]
  +
     *) pstrdup() is implicit in calls to table_* functions, so there's
        no need to do it before calling.  Clean up a few cases.
        [Marc Slemko, Dean Gaudet]
  @@ -112,7 +115,7 @@
        htdocs/manual/misc/known_client_problems.html#257th-byte) can happen
        at the 256th byte as well.  Fixed.  [Dean Gaudet]
   
  -  *) Fix mod_mime_magic under OS/2, no support for block devices.
  +  *) PORT: Fix mod_mime_magic under OS/2, no support for block devices.
        [Brian Havard]
   
     *) Fix memory corruption caused by allocating auth usernames in the
  
  
  
  1.267     +16 -4     apachen/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.266
  retrieving revision 1.267
  diff -u -r1.266 -r1.267
  --- http_main.c	1998/01/12 04:33:32	1.266
  +++ http_main.c	1998/01/13 21:19:10	1.267
  @@ -2223,6 +2223,10 @@
       sa.sa_handler = sig_term;
       if (sigaction(SIGTERM, &sa, NULL) < 0)
   	aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGTERM)");
  +#ifdef SIGINT
  +    if (sigaction(SIGINT, &sa, NULL) < 0)
  +        aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGINT)");
  +#endif
   
       /* we want to ignore HUPs and USR1 while we're busy processing one */
       sigaddset(&sa.sa_mask, SIGHUP);
  @@ -2263,11 +2267,11 @@
   
   void detach(void)
   {
  -#if !defined(WIN32) && !defined(__EMX__)
  +#if !defined(WIN32)
       int x;
   
       chdir("/");
  -#ifndef MPE
  +#if !defined(MPE) && !defined(__EMX__)
   /* Don't detach for MPE because child processes can't survive the death of
      the parent. */
       if ((x = fork()) > 0)
  @@ -2293,7 +2297,7 @@
       }
   #elif defined(__EMX__)
       /* OS/2 don't support process group IDs */
  -    pgrp = -getpid();
  +    pgrp = getpid();
   #elif defined(MPE)
       /* MPE uses negative pid for process group */
       pgrp = -getpid();
  @@ -2323,7 +2327,7 @@
        * but we haven't opened that yet.  So leave it alone for now and it'll
        * be reopened moments later.
        */
  -#endif /* ndef WIN32 or __EMX__ */
  +#endif /* ndef WIN32 */
   }
   
   /* Set group privileges.
  @@ -2906,6 +2910,14 @@
   #endif
       signal(SIGPIPE, timeout);
       signal(SIGALRM, alrm_handler);
  +
  +#ifdef __EMX__
  +/* Stop Ctrl-C/Ctrl-Break signals going to child processes */
  +    {
  +        unsigned long ulTimes;
  +        DosSetSignalExceptionFocus(0, &ulTimes);
  +    }
  +#endif
   
       while (1) {
   	BUFF *conn_io;
  
  
  

Mime
View raw message