5

I am looking for a way to check the current number of file descriptors being monitored by an epoll instance. I use the following for creating and populating the epoll instance

epoll_create
epoll_ctl

Platform is Gnu/Linux.

Yordan Pavlov
  • 1,303
  • 2
  • 13
  • 26

1 Answers1

2

As far as I know, there is no system call available which can provide the count of file descriptors which are getting monitored by epoll. You can achieve this by maintaining one counter variable. Increment/decrement this variable after successfully adding/removing the file descriptor to the epoll using epoll_ctl().

Noushad
  • 106
  • 1
  • 4