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)
117117 free (dmn );
118118}
119119
120+ static pthread_t manager_thread ;
121+
120122static void
121123_dispatch_muxnote_signal_block_and_raise (int signo )
122124{
@@ -125,7 +127,7 @@ _dispatch_muxnote_signal_block_and_raise(int signo)
125127 // receive them. Fix that by lazily noticing, blocking said signal,
126128 // and raising the signal again when it happens
127129 _dispatch_sigmask ();
128- raise ( signo );
130+ pthread_kill ( manager_thread , signo );
129131}
130132
131133static dispatch_muxnote_t
@@ -147,6 +149,7 @@ _dispatch_muxnote_create(dispatch_unote_t du, uint32_t events)
147149 switch (filter ) {
148150 case EVFILT_SIGNAL :
149151 if (!sigismember (& signals_with_unotes , du ._du -> du_ident )) {
152+ manager_thread = pthread_self ();
150153 sigaddset (& signals_with_unotes , du ._du -> du_ident );
151154 sigaction (du ._du -> du_ident , & sa , NULL );
152155 }
You can’t perform that action at this time.
0 commit comments