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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:863:    wd = new_wd;    return;    }    };    ::register_path(initial);    }       protected void unregister_path(int|void dying)    {    if (wd != -1) { +  // NB: instance may be null if the main object has been destructed +  // and we've been called via a destroy(). +  if (instance) {    instance->rm_watch(wd); -  +  }    wd = -1;    if (!dying) {    // We now need to be polled...    monitor_queue->push(this);    }    }    ::unregister_path(dying);    }       protected void destroy()
pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:1318:   //! Change backend.   //!   //! @param backend   //! Backend to use. @expr{0@} (zero) for the default backend.   void set_backend(Pike.Backend|void backend)   {    int was_nonblocking = !!co_id;    set_blocking();    this::backend = backend;   #if HAVE_INOTIFY +  if (file) {    if (backend) {    file->set_backend(backend);    } else {    file->set_backend(Pike.DefaultBackend);    } -  +  }   #endif    if (was_nonblocking) {    set_nonblocking();    }   }      //! Turn off nonblocking mode.   //!   //! @seealso   //! @[set_nonblocking()]