summaryrefslogtreecommitdiff
path: root/base/errors_unix.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2018-10-08 17:33:50 -0700
committerTom Cherry <tomcherry@google.com>2018-10-12 18:28:59 -0700
commit4f22786cc9c9b22d353487678058e2075a968a9d (patch)
treea310d4bcf5d6fc314df454fc8aa1c431ed8703b1 /base/errors_unix.cpp
parentb3bc8427505c55a4134eac438f118a9b1acb4e2f (diff)
logd: rework logic for LogTimeEntry
LogTimeEntry's lifecycle is spread out in various locations. It further seems incomplete as there is logic that assumes that its associated thread can exit while the underlying LogTimeEntry remains valid, however it doesn't appear that that is actually a supported situation. This change simplifies this logic to have only one valid state for a LogTimeEntry: it must have its thread running and be present in LastLogTimes. A LogTimeEntry will never be placed into LastLogTimes unless its thread is running and its thread will remove its associated LogTimeEntry from LastLogTimes before it has exited. This admittedly breaks situations where a blocking socket gets issued multiple commands with different pid filters, tail lines, etc, however, I'm reasonably sure that these situations were already broken. A check is added to close the socket in this case. Test: multiple logcat instances work, logd.reader.per's are cleaned up Change-Id: Ibe8651e7d530c5e9a8d6ce3150cd247982887cbe
Diffstat (limited to 'base/errors_unix.cpp')
0 files changed, 0 insertions, 0 deletions