mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-18 13:05:38 +00:00
BUG/MINOR: threads: always set an owner to the thread_sync pipe
The owner of the fd used by the synchronization pipe was set to NULL, making it ignored by maxfd computation. The risk would be that some synchronization events get delayed between threads when using poll() or select(). However this is only theorical since the pipe is created before listeners are bound so normally its FD should be lower and this should normally not happen. The only possible situation would be if all listeners are bound to inherited FDs which are lower than the pipe's. This patch must be backported to 1.8.
This commit is contained in:
parent
0048dd04c9
commit
c20d737338
@ -49,7 +49,7 @@ int thread_sync_init(unsigned long mask)
|
||||
rfd = threads_sync_pipe[0];
|
||||
fcntl(rfd, F_SETFL, O_NONBLOCK);
|
||||
|
||||
fdtab[rfd].owner = NULL;
|
||||
fdtab[rfd].owner = thread_sync_io_handler;
|
||||
fdtab[rfd].iocb = thread_sync_io_handler;
|
||||
fd_insert(rfd, MAX_THREADS_MASK);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user