apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/threadproc/unix signals.c
Date Tue, 27 Feb 2001 18:33:10 GMT
trawick     01/02/27 10:33:09

  Modified:    threadproc/unix signals.c
  Log:
  Get the signal thread (and thus Apache threaded MPMs) working properly
  on AIX and Tru64.
  
  On certain platforms, sigwait() returns EINVAL if any of various
  unblockable signals are included in the mask.  This was first observed
  on AIX and Tru64.
  
  On AIX (4.3.3, at least), sigwait() won't wake up if the high-order bit
  of the second word of flags is turned on.  sigdelset() returns an error
  when trying to turn this off, so we'll turn it off manually.
  
  Revision  Changes    Path
  1.27      +27 -0     apr/threadproc/unix/signals.c
  
  Index: signals.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/unix/signals.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- signals.c	2001/02/27 13:09:25	1.26
  +++ signals.c	2001/02/27 18:33:07	1.27
  @@ -275,6 +275,33 @@
   
       /* This thread will be the one responsible for handling signals */
       sigfillset(&sig_mask);
  +
  +    /* On certain platforms, sigwait() returns EINVAL if any of various
  +     * unblockable signals are included in the mask.  This was first 
  +     * observed on AIX and Tru64.
  +     */
  +#ifdef SIGKILL
  +    sigdelset(&sig_mask, SIGKILL);
  +#endif
  +#ifdef SIGSTOP
  +    sigdelset(&sig_mask, SIGSTOP);
  +#endif
  +#ifdef SIGCONT
  +    sigdelset(&sig_mask, SIGCONT);
  +#endif
  +#ifdef SIGWAITING
  +    sigdelset(&sig_mask, SIGWAITING);
  +#endif
  +
  +    /* On AIX (4.3.3, at least), sigwait() won't wake up if the high-
  +     * order bit of the second word of flags is turned on.  sigdelset()
  +     * returns an error when trying to turn this off, so we'll turn it
  +     * off manually.
  +     */
  +#ifdef _AIX
  +    sig_mask.hisigs &= 0x7FFFFFFF;
  +#endif
  +
       while (1) {
           int signal_received;
   
  
  
  

Mime
View raw message