Changeset 860 for vendor/current/lib/tevent
- Timestamp:
- May 12, 2014, 8:58:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/tevent/tevent_signal.c
r740 r860 123 123 /* we've filled the info array - block this signal until 124 124 these ones are delivered */ 125 #ifdef HAVE_UCONTEXT_T 126 /* 127 * This is the only way for this to work. 128 * By default signum is blocked inside this 129 * signal handler using a temporary mask, 130 * but what we really need to do now is 131 * block it in the callers mask, so it 132 * stays blocked when the temporary signal 133 * handler mask is replaced when we return 134 * from here. The callers mask can be found 135 * in the ucontext_t passed in as the 136 * void *uctx argument. 137 */ 138 ucontext_t *ucp = (ucontext_t *)uctx; 139 sigaddset(&ucp->uc_sigmask, signum); 140 #else 141 /* 142 * WARNING !!! WARNING !!!! 143 * 144 * This code doesn't work. 145 * By default signum is blocked inside this 146 * signal handler, but calling sigprocmask 147 * modifies the temporary signal mask being 148 * used *inside* this handler, which will be 149 * replaced by the callers signal mask once 150 * we return from here. See Samba 151 * bug #9550 for details. 152 */ 125 153 sigset_t set; 126 154 sigemptyset(&set); 127 155 sigaddset(&set, signum); 128 156 sigprocmask(SIG_BLOCK, &set, NULL); 157 #endif 129 158 TEVENT_SIG_INCREMENT(sig_state->sig_blocked[signum]); 130 159 }
Note:
See TracChangeset
for help on using the changeset viewer.