Ignore:
Timestamp:
May 13, 2014, 11:39:04 AM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update trunk to 3.6.23

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/lib/tevent/tevent_signal.c

    r745 r862  
    126126                /* we've filled the info array - block this signal until
    127127                   these ones are delivered */
     128#ifdef HAVE_UCONTEXT_T
     129                /*
     130                 * This is the only way for this to work.
     131                 * By default signum is blocked inside this
     132                 * signal handler using a temporary mask,
     133                 * but what we really need to do now is
     134                 * block it in the callers mask, so it
     135                 * stays blocked when the temporary signal
     136                 * handler mask is replaced when we return
     137                 * from here. The callers mask can be found
     138                 * in the ucontext_t passed in as the
     139                 * void *uctx argument.
     140                 */
     141                ucontext_t *ucp = (ucontext_t *)uctx;
     142                sigaddset(&ucp->uc_sigmask, signum);
     143#else
     144                /*
     145                 * WARNING !!! WARNING !!!!
     146                 *
     147                 * This code doesn't work.
     148                 * By default signum is blocked inside this
     149                 * signal handler, but calling sigprocmask
     150                 * modifies the temporary signal mask being
     151                 * used *inside* this handler, which will be
     152                 * replaced by the callers signal mask once
     153                 * we return from here. See Samba
     154                 * bug #9550 for details.
     155                 */
    128156                sigset_t set;
    129157                sigemptyset(&set);
    130158                sigaddset(&set, signum);
    131159                sigprocmask(SIG_BLOCK, &set, NULL);
     160#endif
    132161                TEVENT_SIG_INCREMENT(sig_state->sig_blocked[signum]);
    133162        }
Note: See TracChangeset for help on using the changeset viewer.