Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0d847fb4 authored by Tom Cherry's avatar Tom Cherry
Browse files

liblog: add a timeout for logd command socket operations

Add a 2s timeout for logd command socket operations:
  android_logger_clear
  android_logger_get_log_readable_size
  android_logger_get_log_size
  android_logger_set_log_size
  android_logger_get_statistics
  android_logger_get_prune_list
  android_logger_set_prune_list

That correspond to:
  logcat -c
  logcat -g
  logcat -G
  logcat -S
  logcat -p
  logcat -P

These operations should return immediately in typical circumstances,
but if logd is stuck, they would otherwise block indefinitely.  This
allows the commands to gracefully timeout instead.

Test: kill -s STOP `pidof logd`; logcat -g (and other options)
      times out appropriately
Test: logcat -g (and other options) work successfully otherwise
Change-Id: I6c4671a9b3daa4a454c0a14ae7d0b7d3b08be77a
parent 3085d957
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment