From d7df620b5723d6d7d41338be330ca293f62aa23c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 24 Jul 2013 13:56:10 -0700 Subject: [PATCH] global/signal_handler: poll on the control pipe, too 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 Reviewed-by: Yehuda Sadeh --- src/global/signal_handler.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/global/signal_handler.cc b/src/global/signal_handler.cc index d403637002b..ce604fe1e5d 100644 --- a/src/global/signal_handler.cc +++ b/src/global/signal_handler.cc @@ -195,6 +195,10 @@ struct SignalHandler : public Thread { 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]; -- 2.47.3