[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?
- [PATCH] tail: fix a race condition, Giuseppe Scrivano, 2009/10/12
- Re: [PATCH] tail: fix a race condition,
Jim Meyering <=
- Re: [PATCH] tail: fix a race condition, Giuseppe Scrivano, 2009/10/13
- Re: [PATCH] tail: fix a race condition, Giuseppe Scrivano, 2009/10/20
- Re: [PATCH] tail: fix a race condition, Pádraig Brady, 2009/10/20
- Re: [PATCH] tail: fix a race condition, Jim Meyering, 2009/10/20
- Re: [PATCH] tail: fix a race condition, Giuseppe Scrivano, 2009/10/20
- Re: [PATCH] tail: fix a race condition, Jim Meyering, 2009/10/20
- Re: [PATCH] tail: fix a race condition, Giuseppe Scrivano, 2009/10/20
- Re: [PATCH] tail: fix a race condition, Jim Meyering, 2009/10/22
- Re: [PATCH] tail: fix a race condition, Jim Meyering, 2009/10/22