diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-09-16 15:34:00 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2015-10-07 16:23:57 -0700 |
commit | c5dc970edc202f89ecdd0c2fe988c7e2b8408bef (patch) | |
tree | 939b09168d4b6cf6b9de722f55a990d9fdda597b /logd/CommandListener.cpp | |
parent | de4bb9c1a704d0eab3320b43c3964342f4b662df (diff) | |
download | system_core-c5dc970edc202f89ecdd0c2fe988c7e2b8408bef.tar.gz system_core-c5dc970edc202f89ecdd0c2fe988c7e2b8408bef.tar.bz2 system_core-c5dc970edc202f89ecdd0c2fe988c7e2b8408bef.zip |
logd: clear return and deal with busy if readers locked
- Propagate to caller the clearing errors, busy blocked by reader.
- For clear, perform retries within logd with a one second lul each,
telling readers to skip, but on final retry to kill all readers if
problem still persists due to block reader (or high volume logspammer).
Bug: 23711431
Change-Id: Ie4c46bc9480a7f49b96a81fae25a95c603270c33
Diffstat (limited to 'logd/CommandListener.cpp')
-rw-r--r-- | logd/CommandListener.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/logd/CommandListener.cpp b/logd/CommandListener.cpp index 031c74018..eafa28fb4 100644 --- a/logd/CommandListener.cpp +++ b/logd/CommandListener.cpp @@ -96,8 +96,7 @@ int CommandListener::ClearCmd::runCommand(SocketClient *cli, return 0; } - mBuf.clear((log_id_t) id, uid); - cli->sendMsg("success"); + cli->sendMsg(mBuf.clear((log_id_t) id, uid) ? "busy" : "success"); return 0; } |