Bug#824244: libfilesys-notify-simple-perl: fails to notify on moves with inotify

gregor herrmann gregoa at debian.org
Sat May 14 13:09:43 UTC 2016


On Sat, 14 May 2016 04:22:46 +0000, Eric Wong wrote:

> I tried to have this watch some Maildirs but it fails to
> detect rename() calls.  So this probably should watch for
> IN_MOVED_TO and IN_MOVED_FROM events from inotify.
> 
> I also tried 0.12-1 from jessie with the same effect.

Thanks for your bug report.

I haven't tried myself now, but looking at the code this should work.
Filesys::Notify::Simple uses Linux::Inotify2, and does:

    my $inotify = Linux::Inotify2->new;
    
    my $fs = _full_scan(@path);
    for my $path (keys %$fs) {
        $inotify->watch($path, &IN_MODIFY|&IN_CREATE|&IN_DELETE|&IN_DELETE_SELF|&IN_MOVE_SELF|&IN_MOVE);
    }

and, according to the Linux::Inotify2 documentation:
    IN_MOVE              same as IN_MOVED_FROM | IN_MOVED_TO


So this needs further investigation ...


Cheers,
gregor

-- 
 .''`.  Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Pink Floyd: On the Turning Away
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20160514/8d9e3fbe/attachment.sig>


More information about the pkg-perl-maintainers mailing list