util: fix premature exit in dump mode 01/171201/1
authorMichal Bloch <m.bloch@samsung.com>
Tue, 27 Feb 2018 09:43:21 +0000 (10:43 +0100)
committerMichal Bloch <m.bloch@samsung.com>
Tue, 27 Feb 2018 10:51:14 +0000 (11:51 +0100)
commitd29dbe9f646ee2e66296ed8570a6bb48359aca2a
tree73b27854745863557a1c0f24b5028f05dc1c4051
parentb11bdd9ab3d2ef8dd54c7be834f9ddf0269e52d4
util: fix premature exit in dump mode

The program would end when epoll reported no ready file descriptors.
This was incorrect as data could still be awaiting to be put into
the fd when dlogutil read data from a pipe faster than dlog_logger
could feed it. Android Logger relied on this behaviour to exit when
there were no logs to read as there would not be a read() to trigger
the exit through its regular "log_len quota filled" exit path, but is
otherwise unaffected.

Change-Id: I58abc94dba9d161de684a73fe585b3efa764d0f8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
src/logutil/logutil.c