chiark / gitweb /
core/path: install inotify watches top-down instead of bottom-up
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 3 Mar 2013 06:32:34 +0000 (01:32 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 4 Mar 2013 01:16:56 +0000 (20:16 -0500)
commitbc41f93e90f6edcc9067f3bc1085bb6c85082c00
tree3dc1a8a6642b283dfa5844c667128f7ded0a4611
parent03c149144d374cffd40a17ffb067837e3e220933
core/path: install inotify watches top-down instead of bottom-up

When watches are installed from the bottom, it is always possible
to race, and miss a file creation event. The race can be avoided
if a watch is first established for a parent directory, and then for
the file in the directory. If the file is created in the time between,
the watch on the parent directory will fire.

Some messages (mostly at debug level) are added to help diagnose
pidfile issues.

Should fix https://bugzilla.redhat.com/show_bug.cgi?id=917075.
src/core/path.c
src/core/service.c