[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tail: fix a race condition

From: Jim Meyering
Subject: Re: [PATCH] tail: fix a race condition
Date: Tue, 13 Oct 2009 11:33:26 +0200

Giuseppe Scrivano wrote:
> this patch fixes a race condition when a watched file is modified
> between `tail_file' and `inotify_add_watch'.
> I refactored out a new function from `tail_forever_inotify' and force a
> check, using this same new function, after inotify watchers are already
> active.
> Subject: [PATCH] tail: fix a race condition
> * NEWS (Bug fixes): Mention it.
> * src/tail.c (check_fspec): New function.
> (tail_forever_inotify): Ensure there is no new data before entering the
> inotify events wait loop.

Hi Giuseppe,

Thank you!

I haven't reviewed this yet, but will do so today or tomorrow.
I know triggering race conditions can be hard, but
can you write a script that demonstrates the failure?

This might be a good excuse to experiment with the
now-usable-as-non-root system tap (stap) tool.
It's fine for test scripts to rely on bleeding-edge
technology -- just skip the test if the tool is not available;
most developers will have it.

BTW, did you notice an actual failure, or did you spot this via inspection?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]