mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
journalctl: do not treat EINTR as an error when waiting for events
Fixup for 2a1e0f2228
. Fixes #10724.
Reproducer: start 'journalctl -f' in a terminal window, change window size.
This commit is contained in:
parent
a90db619ca
commit
8e143a1232
@ -2058,8 +2058,13 @@ static int wait_for_change(sd_journal *j, int poll_fd) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to determine journal waiting time: %m");
|
||||
|
||||
if (ppoll(pollfds, ELEMENTSOF(pollfds), timeout == USEC_INFINITY ? NULL : timespec_store(&ts, timeout), NULL) < 0)
|
||||
if (ppoll(pollfds, ELEMENTSOF(pollfds),
|
||||
timeout == USEC_INFINITY ? NULL : timespec_store(&ts, timeout), NULL) < 0) {
|
||||
if (errno == EINTR)
|
||||
return 0;
|
||||
|
||||
return log_error_errno(errno, "Couldn't wait for journal event: %m");
|
||||
}
|
||||
|
||||
if (pollfds[1].revents & (POLLHUP|POLLERR)) { /* STDOUT has been closed? */
|
||||
log_debug("Standard output has been closed.");
|
||||
|
Loading…
Reference in New Issue
Block a user