in reply to Re^2: Find the Files added to the directory in Linux.
in thread Find the Files added to the directory in Linux.

No, sleep and usleep would be counter productive and just slow detection down. The whole beauty of iNotify is that the process sleeps until an event happens, and then its woken by the kernel and passed the event structure. The code as is takes next to zero system resources.

  • Comment on Re^3: Find the Files added to the directory in Linux.

Replies are listed 'Best First'.
Re^4: Find the Files added to the directory in Linux.
by flexvault (Monsignor) on Jul 05, 2013 at 11:34 UTC

    Loops,

    That little bit of wisdom should be added to the description of iNotify. I checked before commenting.

    Regards...Ed

    "Well done is better than well said." - Benjamin Franklin

      Agreed, it's not made explicit on the linked CPAN page, and should be. It is a relatively well documented Linux kernel feature designed for this very purpose. But nobody should have to dig that information up when using Perl.