agarrubio has asked for the wisdom of the Perl Monks concerning the following question:
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Linux::Inotify2 remove single watch
by Anonymous Monk on Jul 23, 2016 at 18:45 UTC | |
by agarrubio (Novice) on Jul 30, 2016 at 20:29 UTC | |
by Anonymous Monk on Oct 25, 2018 at 01:22 UTC |