|
From: | Pádraig Brady |
Subject: | Re: Unexpected behavior of 'tail --follow=name' on special file via symlink |
Date: | Wed, 1 Feb 2023 21:25:40 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0 |
On 01/02/2023 20:37, Pádraig Brady wrote:
diff --git a/src/tail.c b/src/tail.c index 2244509dd..309d93072 100644 --- a/src/tail.c +++ b/src/tail.c @@ -1243,7 +1243,8 @@ tail_forever (struct File_spec *f, size_t n_files, double sleep_interval) recheck (&f[i], f[i].blocking); f[i].n_unchanged_stats = 0; } - continue; + if (S_ISREG (stats.st_mode) || 1 < n_files) + continue; }
The above diff wouldn't work as it would always bypass the recheck(). Attached is an (untested) update, which might work for your case. cheers, Pádraig
tail-F-dev.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |