diff options
-rw-r--r-- | cmds/screencap/screencap.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmds/screencap/screencap.cpp b/cmds/screencap/screencap.cpp index 000420f29c3b..5fedc9e74087 100644 --- a/cmds/screencap/screencap.cpp +++ b/cmds/screencap/screencap.cpp @@ -84,6 +84,11 @@ static status_t notifyMediaScanner(const char* fileName) { int main(int argc, char** argv) { + // setThreadPoolMaxThreadCount(0) actually tells the kernel it's + // not allowed to spawn any additional threads, but we still spawn + // a binder thread from userspace when we call startThreadPool(). + // See b/36066697 for rationale + ProcessState::self()->setThreadPoolMaxThreadCount(0); ProcessState::self()->startThreadPool(); const char* pname = argv[0]; |