mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-15 02:36:08 -04:00
verified SIGCHLD being sent when thread completes
This commit is contained in:
9
Loop.cpp
9
Loop.cpp
@ -1822,7 +1822,9 @@ void Loop::doPoll ( ) {
|
||||
// // if niceness is not -1, handle it below
|
||||
// }
|
||||
|
||||
// poll the fd's searching for socket closes
|
||||
// . poll the fd's searching for socket closes
|
||||
// . the sigalrms and sigvtalrms and SIGCHLDs knock us out of this
|
||||
// select() with n < 0 and errno equal to EINTR
|
||||
n = select (MAX_NUM_FDS,
|
||||
&readfds,
|
||||
&writefds,
|
||||
@ -1832,10 +1834,11 @@ void Loop::doPoll ( ) {
|
||||
g_inWaitState = false;
|
||||
|
||||
if ( n < 0 ) {
|
||||
// got it
|
||||
//log("loop: got errno=%li",(long)errno);
|
||||
// valgrind
|
||||
if ( errno == EINTR ) {
|
||||
// got it. if we get a sig alarm or vt alarm or
|
||||
// SIGCHLD (from Threads.cpp) we end up here.
|
||||
//log("loop: got errno=%li",(long)errno);
|
||||
// if shutting own was it a sigterm ?
|
||||
if ( m_shutdown ) goto again;
|
||||
// handle returned threads for niceness 0
|
||||
|
@ -2350,6 +2350,9 @@ int startUp ( void *state ) {
|
||||
// . i noticed during the linkdb rebuild we were not getting the signal
|
||||
//sigqueue ( s_pid, GB_SIGRTMIN + 1 + t->m_niceness, svt ) ;
|
||||
|
||||
// i verified this breaks select() in Loop.cpp out of it's sleep
|
||||
//fprintf(stderr,"threads sending SIGCHLD\n");
|
||||
|
||||
// try a sigchld now! doesn't it already do this? no...
|
||||
sigqueue ( s_pid, SIGCHLD, svt ) ;
|
||||
|
||||
|
Reference in New Issue
Block a user