If epoll_ctl fails, the descr->ev array isinconsistent
Let's take an example:
fd = open(..) /* fd = 3 for example */
lxc_mainloop_add_handler(descr, fd, cb1, data1) fails.
the program take care of the error, it closes the fd
Later, reopen a fd (get 3 for again)
lxc_mainloop_add_handler(desc, fd, cb2, data2) is ok.
When something happen on fd, cb1 with data1 will be called instead of
cb2 with data2, because descr->ev contains 2 entries for fd == 3.
Signed-off-by:
Clement Calmels <clement.calmels@fr.ibm.com>
Signed-off-by:
Daniel Lezcano <dlezcano@fr.ibm.com>
Showing
Please
register
or
sign in
to comment