coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tail should dereference watched file


From: Bernhard Voelker
Subject: Re: [PATCH] tail should dereference watched file
Date: Mon, 16 Sep 2013 15:34:34 +0200 (CEST)

> On September 16, 2013 at 2:20 PM Ondrej Oprala <address@hidden> wrote:
> thank you both for looking at the patch.

No worries.
Just for the record: the new test was racy:

> +echo 1 > file
> +ln -sf file filelink
> +
> +#watch a symlink
> +tail -F ./filelink > out 2>/dev/null &
> +
> +rm file
> +echo 2 > file
> +kill %1
> +
> +#does tail output the contents of a reappearing file?
> +[ $(wc -l < out) = 2 ] || fail=1

It is not guaranteed that the rm(1) comes after tail(1) had
a chance to see line "1".  See tests/tail-2/retry.sh.

Have a nice day,
Berny



reply via email to

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