verified SIGCHLD being sent when thread completes

This commit is contained in:
mwells
2014-09-03 11:05:15 -07:00
parent c1a8053b52
commit 7e3215d176
2 changed files with 9 additions and 3 deletions

@ -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 ) ;