On Sat, Apr 11, 2015 at 5:13 AM, David Herrmann <dh.herrm...@gmail.com> wrote: > Nice catch! > > There's indeed a small race between handling inotify and queuing up > the change-event. We need to re-loop there. One day we should switch > to sd-event to avoid such bugs... I mean the symptom is inherent to > queuing up events while handling them. Meh!
Thanks for reviewing this. Reading your comment, I wonder if there is a small bug in the solution here. Sometimes we may handle inotify events, but without generating change events. After my change, we will loop again, but there may be no events pending, in which case we will block on the 3 second timeout before completing the next loop iteration and replying to settle's ping message. Do you agree? Should I improve this to only do the extra loop iteration in the case where we generated change events, or somehow make the next loop iteration have timeout 0 (non-blocking)? Thanks Daniel _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel