We also need to poll the control fd/pipe so that we restart the poll loop
when new signal handlers are added. This was broken by commit
8e4a78f1.
Fixes: #5742
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
lock.Lock();
int num_fds = 0;
+ fds[num_fds].fd = pipefd[0];
+ fds[num_fds].events = POLLIN | POLLOUT | POLLERR;
+ fds[num_fds].revents = 0;
+ ++num_fds;
for (unsigned i=0; i<32; i++) {
if (handlers[i]) {
fds[num_fds].fd = handlers[i]->pipefd[0];