Set CLOEXEC on epoll FD

Konstantin Olkhovskiy lupus at oxnull.net
Thu Oct 25 08:23:50 CEST 2012


Georg,

you can give a shot for valgrind --track-fds=yes.

It might give you some clue about where was fd created.
May be it's not libev specific.

2012/10/24 Marc Lehmann <schmorp at schmorp.de>

> On Wed, Oct 24, 2012 at 04:25:32PM +0200, Georg Wicherski <gw at oxff.net>
> wrote:
> > - Can you set CLOEXEC on the epoll FD, please?
>
> libev has always set CLOEXEC on the fd, AFAICR - which version are you
> using?
>
> > - What is a hackish way to get that FD and do this myself until such a
> > patch is available in the major distrubtions? Iterating over all file
> > descriptors is not a solution. ;)
>
> Find the structure offset in the loop struct and read it - sounds hackish
> enough to me. But since libev already sets CLOEXEC on all it's fds, there
> is no need to do that.
>
> So, what is it that you are really seeing, as opposed to what you are
> guessing that happens? Maybe the fd you are seeing isn't really libev's
> epoll fd?
>
> --
>                 The choice of a       Deliantra, the free code+content
> MORPG
>       -----==-     _GNU_              http://www.deliantra.net
>       ----==-- _       generation
>       ---==---(_)__  __ ____  __      Marc Lehmann
>       --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
>       -=====/_/_//_/\_,_/ /_/\_\
>
> _______________________________________________
> libev mailing list
> libev at lists.schmorp.de
> http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
>



-- 
Regards,
Konstantin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20121025/8d5e58a6/attachment.html>


More information about the libev mailing list