use strict; use warnings; use Linux::Inotify2; my $inotify=new Linux::Inotify2 or die "Unable to create new inotify object: $!"; my $watch_one= $inotify->watch("/var/tmp/one", IN_MODIFY , sub {print "one modified\n"} ) or die "one $!\n"; my $watch_two= $inotify->watch("/var/tmp/two", IN_MODIFY, sub {print "two modified\n"} ) or die "two $!\n"; $watch_one->cancel; # Canceling a single watch stops all activity 1 while $inotify->poll; print STDERR "loop stoped blocking\n";
In reply to Linux::Inotify2 remove single watch by agarrubio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |