journalctl: make sure 'journalctl -f -t unmatched' blocks
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 02ab86c732 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
This commit is contained in:
@@ -2066,8 +2066,12 @@ int main(int argc, char *argv[]) {
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user