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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:234:   //! @seealso   //! @[monitor()]   protected class Monitor(string path,    MonitorFlags flags,    int max_dir_check_interval,    int file_interval_factor,    int stable_time)   {    int next_poll;    Stdio.Stat st; -  int last_change = 0x7fffffff; // Future... +  int last_change = 0x7fffffff; // Future... Can be set to -0x7fffffff +  // to indicate immediate stabilization +  // (avoid an extra check() round to +  // let the stat stabilize).    array(string) files;      #ifdef HAVE_INOTIFY    int wd;   #endif       int `<(mixed m) { return next_poll < m; }    int `>(mixed m) { return next_poll > m; }       void create()
pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:730:    }    }    update(st);    return 1;    } else {    return 0;    }       // Note: ctime seems to change unexpectedly when running ImageMagick    // on NFS disk so we disable it for the moment [bug 5587]. -  if ((st->mtime != old_st->mtime) || +  if (last_change != -0x7fffffff && +  ((st->mtime != old_st->mtime) ||    /* (st->ctime != old_st->ctime) || */ -  (st->size != old_st->size)) { +  (st->size != old_st->size))) {    last_change = time(1);    update(st);    if (status_change(old_st, st, orig_flags, flags)) return 1;    } else if (last_change < time(1) - (stable_time || global::stable_time)) {    last_change = 0x7fffffff;    stable_data_change(path, st);    return 1;    } else if (last_change != 0x7fffffff &&    st->isdir && status_change(old_st, st, orig_flags, flags)) {    // Directory not stable yet.