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 Fri, 16 Nov 2001 12:14:09 GMT
trawick     01/11/16 04:14:09

  Modified:    .        CHANGES
               threadproc/unix signals.c
  Log:
  Fix apr_setup_signal_thread() to grab the right error code from
  a sigprocmask() failure.  This only affects platforms that use
  sigprocmask() in lieu of pthread_sigmask().
  
  sigprocmask() reports error codes via errno, not via the return
  code.
  
  Revision  Changes    Path
  1.183     +4 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.182
  retrieving revision 1.183
  diff -u -r1.182 -r1.183
  --- CHANGES	2001/11/13 19:46:41	1.182
  +++ CHANGES	2001/11/16 12:14:09	1.183
  @@ -1,5 +1,9 @@
   Changes with APR b1  
   
  +  *) Fix apr_setup_signal_thread() to grab the right error code from
  +     a sigprocmask() failure.  This only affects platforms that use
  +     sigprocmask() in lieu of pthread_sigmask().  [Jeff Trawick]
  +
     *) Fix the Unix HAVE_POLL flavor of apr_poll_socket_mask() so that
        it doesn't segfault.  Avoid some wasted storage in a poll-related
        APR structure.  [INOUE Seiichiro <inoue@ariel-networks.com>]
  
  
  
  1.37      +3 -1      apr/threadproc/unix/signals.c
  
  Index: signals.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/unix/signals.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- signals.c	2001/11/12 19:47:31	1.36
  +++ signals.c	2001/11/16 12:14:09	1.37
  @@ -380,7 +380,9 @@
       remove_sync_sigs(&sig_mask);
   
   #if defined(SIGPROCMASK_SETS_THREAD_MASK)
  -    rv = sigprocmask(SIG_SETMASK, &sig_mask, NULL);
  +    if ((rv = sigprocmask(SIG_SETMASK, &sig_mask, NULL)) != 0) {
  +        rv = errno;
  +    }
   #else
       if ((rv = pthread_sigmask(SIG_SETMASK, &sig_mask, NULL)) != 0) {
   #ifdef PTHREAD_SETS_ERRNO
  
  
  

Mime
View raw message