Previously the following command:
$ journalctl -f -t unmatchedtag12345
... would block when called with criteria that did not match any
journal lines. Once log lines appeared that matched the criteria
they were displayed.
Commit
02ab86c732576a71179ce12e97d44c289833236d broke this
behavior and the journal was not followed, but the command
exits with '-- No entries --' displayed.
This commit fixes the issue.
More information downstream:
https://bugzilla.redhat.com/show_bug.cgi?id=
1253649
goto finish;
}
if (r == 0) {
- printf("-- No entries --\n");
- goto finish;
+ if (arg_follow)
+ need_seek = true;
+ else {
+ printf("-- No entries --\n");
+ goto finish;
+ }
}
if (!arg_follow)