File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ _dispatch_muxnote_dispose(dispatch_muxnote_t dmn)
117
117
free (dmn );
118
118
}
119
119
120
+ static pthread_t manager_thread ;
121
+
120
122
static void
121
123
_dispatch_muxnote_signal_block_and_raise (int signo )
122
124
{
@@ -125,7 +127,7 @@ _dispatch_muxnote_signal_block_and_raise(int signo)
125
127
// receive them. Fix that by lazily noticing, blocking said signal,
126
128
// and raising the signal again when it happens
127
129
_dispatch_sigmask ();
128
- raise ( signo );
130
+ pthread_kill ( manager_thread , signo );
129
131
}
130
132
131
133
static dispatch_muxnote_t
@@ -147,6 +149,7 @@ _dispatch_muxnote_create(dispatch_unote_t du, uint32_t events)
147
149
switch (filter ) {
148
150
case EVFILT_SIGNAL :
149
151
if (!sigismember (& signals_with_unotes , du ._du -> du_ident )) {
152
+ manager_thread = pthread_self ();
150
153
sigaddset (& signals_with_unotes , du ._du -> du_ident );
151
154
sigaction (du ._du -> du_ident , & sa , NULL );
152
155
}
You can’t perform that action at this time.
0 commit comments