On Mon, Jun 19, 2017 at 4:57 PM, romeo kalebic <[email protected]> wrote: > On Monday, June 19, 2017 at 9:48:47 AM UTC+2, Ben Noordhuis wrote: >> >> On Sat, Jun 17, 2017 at 12:57 PM, romeo kalebic <[email protected]> >> wrote: >> > Hi >> > >> > I'm using uv_poll to integrate MariaDB non blocking api to my >> > application. >> > >> > Now I'm testing some unusual situation. >> > >> > I try to make connection to address 8.8.8.8. >> > After, about 63 sec (which I expect) uv_poll_cb is called with status: >> > -9 ( >> > bad file descriptor ) and events set to 0. >> > >> > I was expecting that I will receive UV_DISCONNECT. >> > >> > Is this normal behavior ? >> >> What operating system is this on? The error code normally comes from >> the OS, so if you get UV_EBADF, then presumably something closed the >> >> file descriptor. > > > Hi Ben > > Thanks for response. > > I'm using libuv 1.12.0 on Centos 6.8 64 bit. > > Using strace and gdb I can prove that fd is not closed when callback is > fired. > > Best Regards, Romeo
Ah, okay. What happens is that epoll_wait() returns EPOLLERR, which is reported as EBADF by libuv. EPOLLRDHUP would have been reported as UV_DISCONNECT. -- You received this message because you are subscribed to the Google Groups "libuv" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/libuv. For more options, visit https://groups.google.com/d/optout.
