title: How to release the anonymous inode created by eventfd/eventpoll/timerfd?
body: <p>I am trying to measure an API using Google Benchmark. It deals with the client/server code. The Google Benchmark application, runs the setUp() TearDown() pairs several times to measure the timing in an appropriate way. The client/server works over TCP Transport.</p>
  <p>Problem:
  Within a single process (Google Benchmark) the client is restarted many number of times. This causes remnant anonymous inodes existing and as a result, I get an error</p>
  <blockquote>
  <p>epoll: too many files open</p>
  </blockquote>
  <p>When I try lsof | grep &quot;a_inode&quot;, I see that all the anonymous inodes created by eventfd/eventpoll/filefd exist in opened state.</p>
  <blockquote>
  <p>COMMAND       PID     TID             USER    FD       TYPE             DEVICE SIZE/OFF       NODE NAME</p>
  <p>gbench    6514    6517         boarnerges 1020u  a_inode               0,13        0       9567 [eventfd]</p>
  <p>gbench    6514    6517         boarnerges 1021u  a_inode               0,13        0       9567 [eventpoll]</p>
  <p>gbench    6514    6517         boarnerges 1022u  a_inode               0,13        0       9567 [timerfd]</p>
  <p>gbench    6514    6520         boarnerges cwd       DIR                8,1     4096     543203 /home/boarnerges/project_GoogleBenchmark/build</p>
  <p>gbench    6514    6520         boarnerges rtd       DIR                8,1     4096          2 /</p>
  <p>gbench    6514    6520         boarnerges txt       REG                8,1  2494784     949699 /home/boarnerges/project_GoogleBenchmark/build/tests/tests/GBenchmarkTests/benchmark_client/it_gbenchmark_client</p>
  </blockquote>
  <p>How do I solve this problem? Can the anonymous inodes be released from within the process?</p>