SIGALRM should happen on a worker thread to make our tests happy
Former-commit-id: 10a4b35bc5870aef898d298366f415b163c89efb
This commit is contained in:
parent
422ac66531
commit
ef9e9a0740
@ -5089,6 +5089,15 @@ int main(int argc, char **argv) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Block SIGALRM from this thread, it should only be received on a server thread */
|
||||||
|
sigset_t sigset;
|
||||||
|
sigemptyset(&sigset);
|
||||||
|
sigaddset(&sigset, SIGALRM);
|
||||||
|
pthread_sigmask(SIG_BLOCK, &sigset, nullptr);
|
||||||
|
|
||||||
|
/* The main thread sleeps until all the workers are done.
|
||||||
|
this is so that all worker threads are orthogonal in their startup/shutdown */
|
||||||
void *pvRet;
|
void *pvRet;
|
||||||
pthread_join(rgthread[IDX_EVENT_LOOP_MAIN], &pvRet);
|
pthread_join(rgthread[IDX_EVENT_LOOP_MAIN], &pvRet);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user