diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-03-13 00:02:28 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-03-13 00:26:02 -0400 |
commit | 043945b93824e33e040954612aaa934cd1a43a1b (patch) | |
tree | dc59c64dda33e9899760c0b796de1c5421bfbc50 /catalog/systemd.it.catalog | |
parent | f53f7c8fc43df4e38655f2a1f57777c5934fee06 (diff) |
journal-remote: process events without delay
journal-remote buffers input, and then parses it handling one journal entry at a time.
It was possible for useful data to be left in the buffer after some entries were
processesed. But all data would be already read from the fd, so there would be
no reason for the event loop to call the handler again. After some new data came in,
the handler would be called again, and would then process the "old" data in the buffer.
Fix this by enabling a handler wherever we process input data and do not exhaust data
from the input buffer (i.e. when EAGAIN was not encountered). The handler runs until
we encounter EAGAIN.
Looping over the input data is done in this roundabout way to allow the event loop
to dispatch other events in the meanwhile. If the loop was inside the handler, a
source which produced data fast enough could completely monopolize the process.
https://bugs.freedesktop.org/show_bug.cgi?id=89516
Diffstat (limited to 'catalog/systemd.it.catalog')
0 files changed, 0 insertions, 0 deletions