Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes: > Note that we still have to check for dead children in > check_max_connections(), and since child_handler() knows nothing > about that, it still will write to the pipe, waking up the loop > unnecessarily. > > But that will be rare. > > This is no longer as trivial as I wanted it to be, so I'd > appreciate a few eyeballs on this patch. Yeah, I think the fix-up I sent on top of your patch to make 1-sec timeout conditional would be more appropriate for 'maint' than this one, even though it is a band-aid to the issue. Another thing we might want to consider to make this logic much more simpler would be to move everything out of child_handler(), except the write() whose sole purpose is to allow us break out of the poll(). Then you do not have to use "negative is error and positive is success" convention (which you may regret later when you would need to pass more than one bit of information from the callsite of waitpid() to the callsite of syslog()), nor separate "reap here, report there" code structure. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html