change Christinas previous patch to only perform the check/logging
[sahlberg/ctdb.git] / lib / tevent / tevent_epoll.c
index 3abb0e63e59410bfb22e8220017db737c92daf79..1c3396eb6b6d1b293efe40de25d536914b0cb7bb 100644 (file)
@@ -228,6 +228,8 @@ static void epoll_change_event(struct epoll_event_context *epoll_ev, struct teve
        }
 }
 
+extern pid_t ctdbd_pid;
+
 /*
   event loop handling using epoll
 */
@@ -250,7 +252,9 @@ static int epoll_event_loop(struct epoll_event_context *epoll_ev, struct timeval
                return 0;
        }
 
+       if (getpid() == ctdbd_pid) tevent_before_wait(epoll_ev->ev);
        ret = epoll_wait(epoll_ev->epoll_fd, events, MAXEVENTS, timeout);
+       if (getpid() == ctdbd_pid) tevent_after_wait(epoll_ev->ev);
 
        if (ret == -1 && errno == EINTR && epoll_ev->ev->signal_events) {
                if (tevent_common_check_signal(epoll_ev->ev)) {