For example, the IDE I'm using at the moment (Aptana Studio) notifies me as soon as a file's contents it has open have been changed by some external program.

I can imagine having a periodic loop run stat() on a file and check the time of last data modification. Is this how it's normally done or is there a blocking interrupt-like mechanism used instead?


The inotify system on Linux, or the kqueue system on BSD/OSX, gives you an event-driven ("interrupt-like") mechanism to do this.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.