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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:312:    MON_WERR("Unregistering %O from polling.\n", path);    monitor_queue->remove(this);    }    }       int `<(mixed m) { return next_poll < m; }    int `>(mixed m) { return next_poll > m; }       void create()    { +  if(flags & MF_AUTO || flags & MF_HARD) { +  if(!file_stat(path)) throw(Error.Generic("Unable to monitor non-existent path " + path + +  " when MF_AUTO or MF_HARD is set.\n"));; +  }    MON_WERR("Creating monitor for %O.\n", path);    Element::create(this);    register_path(1);    }       //! Call a notification callback.    //!    //! @param cb    //! Callback to call or @[UNDEFINED] for no operation.    //!
pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:1063:    // We've missed creation of the submonitor.    //    // This can happen in the    //    // Exist ==> Deleted ==> Exists    //    // with no update of the directory inbetween race-condition.    //    // Create the submonitor.    MON_WARN("Monitor lost for path %O.\n", full_path); -  m = monitor(full_path, m->flags | MF_AUTO | MF_HARD, +  mixed err = catch(m = monitor(full_path, m->flags | MF_AUTO | MF_HARD,    m->max_dir_check_interval,    m->file_interval_factor, -  m->stable_time); +  m->stable_time)); +  if(err) +  MON_WARN("Monitor for %O failed. Message: %s\n", full_path, Error.mkerror(err)->message());    // monitor() will not register monitor for path if filter_file()    // returns 0.    if (m) {    m->check(0); // Init monitor.    }    }    }    }       if (m) {