summaryrefslogtreecommitdiffstats
path: root/logd/CommandListener.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2015-09-16 15:34:00 -0700
committerMark Salyzyn <salyzyn@google.com>2015-10-07 16:23:57 -0700
commitc5dc970edc202f89ecdd0c2fe988c7e2b8408bef (patch)
tree939b09168d4b6cf6b9de722f55a990d9fdda597b /logd/CommandListener.cpp
parentde4bb9c1a704d0eab3320b43c3964342f4b662df (diff)
downloadsystem_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.cpp3
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;
}