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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:613:    }    if (old_st) {    if (!st || ((old_st->mode & S_IFMT) != (st->mode & S_IFMT))) {    // File deleted or changed type.       int delay;    // Propagate deletions to any submonitors.    if (files) {    foreach(files, string file) {    file = canonic_path(Stdio.append_path(path, file)); -  if (monitors[file]) { +  if (Monitor submon = monitors[file]) {    // Adjust next_poll, so that the monitor will be checked soon. -  monitors[file]->next_poll = time(1)-1; -  adjust_monitor(monitors[file]); +  // Accelerated monitors will never get polled so check them +  // right away. +  if (submon->accellerated) { +  submon->check(flags); +  } else { +  submon->next_poll = time(1)-1; +  adjust_monitor(submon);    delay = 1;    }    }    } -  +  }    if (delay) {    // Delay the notification until the submonitors have notified.    this::st = old_st;    next_poll = time(1);    adjust_monitor(this);    } else {    if (st) {    // Avoid race when a file has been replaced with a directory    // or vice versa or similar.    st = UNDEFINED;