Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

POSIX replacement for inotify?

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?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading