dsoprea / PyInotify

An efficient and elegant inotify (Linux filesystem activity monitor) library for Python. Python 2 and 3 compatible.
GNU General Public License v2.0
242 stars 73 forks source link

Question about fd monitoring #108

Open kjonca opened 10 months ago

kjonca commented 10 months ago

Assume we have directory and we want.

  1. monitor new files (unix sockets) within it
  2. monitor these sockets

i.e.

Firstly directory is empty, we create inotify on it then in directory we have new socket and my process want to keep eyes on this socket (receive and send messages) and monitor if new socket is created. When second socket appears in directory process should be able to react on communication with these sockets and check if another socket will appear. Normally I would use something like epoll but I am not sure ...