Regression: journalctl -f broken (again) with initially empty filter result (#1292805)
Resolves: #1292805
This commit is contained in:
parent
9207cfc856
commit
e40f4d2f65
|
@ -0,0 +1,48 @@
|
|||
From c025384103a9852f852d075337d1e2066253889f Mon Sep 17 00:00:00 2001
|
||||
From: Stef Walter <stefw@redhat.com>
|
||||
Date: Fri, 14 Aug 2015 16:38:41 +0200
|
||||
Subject: [PATCH 2/4] 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 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
|
||||
---
|
||||
src/journal/journalctl.c | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
|
||||
index 073cc77..5c058dd 100644
|
||||
--- a/src/journal/journalctl.c
|
||||
+++ b/src/journal/journalctl.c
|
||||
@@ -2067,8 +2067,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)
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -104,6 +104,7 @@ Patch0068: 0068-udev-fix-NULL-deref-when-executing-rules.patch
|
|||
Patch0069: 0054-logind-never-select-closing-sessions-for-a-VT.patch
|
||||
Patch0070: 0055-logind-release-VT-positions-when-closing-sessions.patch
|
||||
Patch0071: 0071-nspawn-Don-t-pass-uid-mount-option-for-devpts.patch
|
||||
Patch0072: 0072-journalctl-make-sure-journalctl-f-t-unmatched-blocks.patch
|
||||
|
||||
Patch997: 0001-Re-apply-walters-unit-patch-for-F23-systemd-v222.patch
|
||||
Patch998: 0001-Revert-core-mount-add-dependencies-to-dynamically-mo-v222.patch
|
||||
|
@ -846,6 +847,7 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd
|
|||
%changelog
|
||||
* Thu Jan 7 2016 Jan Synáček <jsynacek@redhat.com> - 222-12
|
||||
- Terminal multiplexers (tmux, screen) are broken in systemd-nspawn containers (#1282626)
|
||||
- Regression: journalctl -f broken (again) with initially empty filter result (#1292805)
|
||||
|
||||
* Tue Jan 5 2016 Jan Synáček <jsynacek@redhat.com> - 222-11
|
||||
- re-apply patches that were removed by mistake (#1263208)
|
||||
|
|
Loading…
Reference in New Issue