Set CLOEXEC on epoll FD

Marc Lehmann schmorp at schmorp.de
Wed Oct 24 16:33:17 CEST 2012


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
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list