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:
Stef Walter
2015-08-17 09:51:51 +02:00
parent 0d4605ec3c
commit c51e1a9635
+6 -2
View File
@@ -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)