Branch: Tag:

2015-09-18

2015-09-18 12:09:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Filesystem.Monitor: set_backend() now knows about Inotify.

832:   #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);
1215:    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();    }