apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsanc...@apache.org
Subject cvs commit: apr/threadproc/unix signals.c
Date Fri, 06 Apr 2001 23:51:38 GMT
wsanchez    01/04/06 16:51:38

  Modified:    threadproc/unix signals.c
  Log:
  If we don't have sigwait(), but we have sigsuspend(), use the latter.
  
  Revision  Changes    Path
  1.30      +7 -1      apr/threadproc/unix/signals.c
  
  Index: signals.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/unix/signals.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- signals.c	2001/04/04 07:35:52	1.29
  +++ signals.c	2001/04/06 23:51:38	1.30
  @@ -267,7 +267,7 @@
   
   #endif /* SYS_SIGLIST_DECLARED */
   
  -#if APR_HAS_THREADS && !defined(OS2) && APR_HAVE_SIGWAIT
  +#if APR_HAS_THREADS && (HAVE_SIGSUSPEND || APR_HAVE_SIGWAIT) && !defined(OS2)
   static void *signal_thread_func(void *signal_handler)
   {
       sigset_t sig_mask;
  @@ -303,6 +303,7 @@
   #endif
   
       while (1) {
  +#if APR_HAVE_SIGWAIT
           int signal_received;
   
           if (apr_sigwait(&sig_mask, &signal_received) != 0)
  @@ -313,6 +314,11 @@
           if (sig_func(signal_received) == 1) {
               return NULL;
           }
  +#elif HAVE_SIGSUSPEND
  +	sigsuspend(&sig_mask);
  +#else
  +#error No apr_sigwait() and no sigsuspend(); I'm stuck.
  +#endif
       }
   }
   
  
  
  

Mime
View raw message