mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-28 15:42:30 +00:00
MINOR: fd: register the write side of the poller pipe as well
The poller's pipe was only registered on the read side since we don't need to poll to write on it. But this leaves some known FDs so it's better to also register the write side with no event. This will allow to show them in "show fd" and to avoid dumping them as unhandled FDs. Note that the only other type of unhandled FDs left are: - stdin/stdout/stderr - epoll FDs The later can be registered upon startup though but at least a dummy handler would be needed to keep the fdtab clean.
This commit is contained in:
parent
5be7c198e5
commit
3a6af1e5e8
5
src/fd.c
5
src/fd.c
@ -762,9 +762,10 @@ static int init_pollers_per_thread()
|
||||
poller_rd_pipe = mypipe[0];
|
||||
poller_wr_pipe[tid] = mypipe[1];
|
||||
fcntl(poller_rd_pipe, F_SETFL, O_NONBLOCK);
|
||||
fd_insert(poller_rd_pipe, poller_pipe_io_handler, poller_pipe_io_handler,
|
||||
tid_bit);
|
||||
fd_insert(poller_rd_pipe, poller_pipe_io_handler, poller_pipe_io_handler, tid_bit);
|
||||
fd_insert(poller_wr_pipe[tid], poller_pipe_io_handler, poller_pipe_io_handler, tid_bit);
|
||||
fd_want_recv(poller_rd_pipe);
|
||||
fd_stop_both(poller_wr_pipe[tid]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user