pike.git / lib / modules / Filesystem.pmod / Monitor.pmod / basic.pike

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:984: Inside #if undefined(INHIBIT_INOTIFY_MONITOR)
   MON_WERR("Creating Inotify monitor instance.\n");    instance = System.Inotify._Instance();    if (backend) instance->set_backend(backend);    instance->set_event_callback(inotify_event);    if (co_id) {    MON_WERR("Turning on nonblocking mode for Inotify.\n");    instance->set_nonblocking();    }    }    -  Stdio.Stat st = file_stat (path, 1); +  // NB: We need to follow symlinks here. +  Stdio.Stat st = file_stat(path);    mixed err;    if (!(flags & MF_AUTO) || (st && st->isdir)) {    // Note: We only want to add watchers on directories. File    // notifications will take place on the directory watch    // descriptors. Expansion of the path to cover notifications    // on individual files is handled in the inotify_event    // callback.       if (err = catch {    int new_wd = instance->add_watch(path,