httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/mpm/mpmt mpmt.c
Date Sun, 09 Jul 2000 04:22:45 GMT
rbb         00/07/08 21:22:45

  Modified:    src/modules/mpm/mpmt mpmt.c
  Log:
  Make mpmt respect SIGTERM when operating in prefork mode.  This basically
  makes mpmt use signals for prefork.  This will need to be changed in the
  future to use the pipe like the rest of the MPMs.
  
  Revision  Changes    Path
  1.5       +9 -0      apache-2.0/src/modules/mpm/mpmt/mpmt.c
  
  Index: mpmt.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt/mpmt.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mpmt.c	2000/07/09 04:11:11	1.4
  +++ mpmt.c	2000/07/09 04:22:45	1.5
  @@ -1009,9 +1009,18 @@
       sigfillset(&sig_mask);
   
   #if defined(SIGPROCMASK_SETS_THREAD_MASK) || defined (NO_THREADS)
  +#ifdef NO_THREADS
  +    sigdelset(&sig_mask, SIGHUP);
  +    sigdelset(&sig_mask, SIGTERM);
  +#endif
       if (sigprocmask(SIG_SETMASK, &sig_mask, NULL) != 0) {
           ap_log_error(APLOG_MARK, APLOG_ALERT, errno, ap_server_conf, "sigprocmask");
       }
  +#ifdef NO_THREADS
  +    ap_signal(SIGHUP, just_die);
  +    ap_signal(SIGTERM, just_die);
  +#endif
  +
   #else
       if (pthread_sigmask(SIG_SETMASK, &sig_mask, NULL) != 0) {
           ap_log_error(APLOG_MARK, APLOG_ALERT, errno, ap_server_conf, "pthread_sigmask");
  
  
  

Mime
View raw message