TODO: somehow unblock procmask?
- backport inotify code to C89.
- inotify file descriptors could leak into child processes.
+ - inotify usage would keep an errornous extra ref on the loop,
+ preventing exit when unregistering all watchers (testcase
+ provided by ry@tinyclouds.org).
- implement EV_WIN32_HANDLE_TO_FD and EV_WIN32_CLOSE_FD configuration
symbols to make it easier for apps to do their own fd management.
- support EV_IDLE_ENABLE being disabled in ev++.h
- point out the unspecified signal mask in the documentation.
- take advantage of inotify_init1, if available, to set cloexec/nonblock
on fd creation, to avoid races.
+ - the signal handling pipe wasn't always initialised under windows
+ (analysed by lekma).
- changed minimum glibc requirement from glibc 2.9 to 2.7, for
signalfd.
#if EV_USE_SIGNALFD
if (ev_is_active (&sigfd_w))
- {
- /*ev_ref (EV_A);*/
- /*ev_io_stop (EV_A_ &sigfd_w);*/
-
- close (sigfd);
- }
+ close (sigfd);
#endif
#if EV_USE_INOTIFY
# endif
{
# if _WIN32
+ evpipe_init (EV_A);
+
signal (w->signum, ev_sighandler);
# else
struct sigaction sa;
wlist_add (&fs_hash [w->wd & (EV_INOTIFY_HASHSIZE - 1)].head, (WL)w);
/* now local changes will be tracked by inotify, but remote changes won't */
- /* unless the filesystem it known to be local, we therefore still poll */
+ /* unless the filesystem is known to be local, we therefore still poll */
/* also do poll on <2.6.25, but with normal frequency */
if (fs_2625 && !statfs (w->path, &sfs))
ev_io_init (&fs_w, infy_cb, fs_fd, EV_READ);
ev_set_priority (&fs_w, EV_MAXPRI);
ev_io_start (EV_A_ &fs_w);
+ ev_unref (EV_A);
}
}
if (fs_fd < 0)
return;
+ ev_ref (EV_A);
ev_io_stop (EV_A_ &fs_w);
close (fs_fd);
fs_fd = infy_newfd ();
fd_intern (fs_fd);
ev_io_set (&fs_w, fs_fd, EV_READ);
ev_io_start (EV_A_ &fs_w);
+ ev_unref (EV_A);
}
for (slot = 0; slot < EV_INOTIFY_HASHSIZE; ++slot)