Home > Enterprise >  POSIX replacement for inotify?
POSIX replacement for inotify?

Time:12-21

I need to tail an input file for commands, ignoring EOF. I've been using inotify(2) to block until changes have been made to the file after reaching EOF, which works fine. However, inotify(2) is a Linux-specific syscall. Are there any alternatives defined in POSIX?

CodePudding user response:

Are there any alternatives defined in POSIX?

No.

Well, it's easy to prove that something exists - it's there. It's harder to prove something is not there.

It's not there. There is no POSIX interface with similar functionality as inotify or kqueue.

If you want to be portable, handle each system separately. Don't reinvent the wheel - libuv and libevent exist.

  • Related