Skip to content

tail: handle events after tailed and before watcher starts watching#3786

Closed
niyaznigmatullin wants to merge 3 commits intouutils:mainfrom
niyaznigmatullin:tail_fix_events_before_inotify
Closed

tail: handle events after tailed and before watcher starts watching#3786
niyaznigmatullin wants to merge 3 commits intouutils:mainfrom
niyaznigmatullin:tail_fix_events_before_inotify

Conversation

@niyaznigmatullin
Copy link
Copy Markdown
Contributor

@niyaznigmatullin niyaznigmatullin commented Aug 6, 2022

When --follow=name read again all the files after watcher has been set up, if file changed just before the watcher started watching and after tail has happened.

This is done only when not using polling.

Tested with this sleep: sleep after all the files tailed and before watcher has been set up. For instance F-headers.sh didn't work without the fix if this line added, but starts working after the fix.

fn follow(files: &mut FileHandling, settings: &mut Settings) -> UResult<()> {
+    thread::sleep(Duration::from_millis(4000));
    let mut process = platform::ProcessChecker::new(settings.pid);

Probably fixes #3765 even without changing the testcase.

@niyaznigmatullin niyaznigmatullin changed the title tial: handle events after tailed and before watcher starts watching tail: handle events after tailed and before watcher starts watching Aug 6, 2022
@niyaznigmatullin
Copy link
Copy Markdown
Contributor Author

@jhscheer, I'm interested in your thoughts on that

@niyaznigmatullin niyaznigmatullin marked this pull request as ready for review August 6, 2022 21:04
@niyaznigmatullin niyaznigmatullin marked this pull request as draft August 9, 2022 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GNU tests/tail-2/F-headers is failing often in the GNU CI

1 participant