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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:825:   //! Override of @[default_stable_time].   protected void create(int|void max_dir_check_interval,    int|void file_interval_factor,    int|void stable_time)   {   #if HAVE_EVENTSTREAM    eventstream->callback_func = eventstream_callback;   #elseif HAVE_INOTIFY    instance = System.Inotify._Instance();    file = Stdio.File(); +  // NB: The backend is typically not set here, but as this class is intended +  // to be overloaded it can not be known for sure. +  if (backend) file->set_backend(backend);    file->assign(instance->fd());    file->set_nonblocking();    file->set_read_callback(inotify_parse);   #endif       if (max_dir_check_interval > 0) {    this::max_dir_check_interval = max_dir_check_interval;    }    if (file_interval_factor > 0) {    this::file_interval_factor = file_interval_factor;
pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:1208:      //! 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 (backend) { +  file->set_backend(backend); +  } else { +  file->set_backend(Pike.DefaultBackend); +  } + #endif    if (was_nonblocking) {    set_nonblocking();    }   }      //! Turn off nonblocking mode.   //!   //! @seealso   //! @[set_nonblocking()]   void set_blocking()