I get some really weird behavior when using the Linux :: Inotify2 module to browse the directory for any newly created files.
I checked the script test to see how it works, and as soon as this was done, I continued to use it in other scripts in which it did not work. Then, when I tried my previous test script again to find some information, oddly enough, it also stopped working. Since then it has not worked. During this time, there were no updates to packages / distributions.
The problem is that she stopped responding to events. Here's the test script:
use strict;
use warnings;
use Linux::Inotify2;
my $inotify = new Linux::Inotify2 or die "unable to create new inotify object: $!";
my $dir = "/my/dir";
$inotify->watch($dir, IN_CREATE, sub {
my $e = shift;
print $e->fullname;
}) or die " Can't watch $!";
1 while $inotify->poll;
script script. , strace script, , , , . ?