summaryrefslogtreecommitdiff
path: root/debuggerd/handler/debuggerd_handler.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2017-02-06 21:08:38 -0800
committerJosh Gao <jmgao@google.com>2017-02-06 21:10:48 -0800
commit54ef57d0b8790ded0c6d36171e144c096c4d25b5 (patch)
tree4e3a971684664dfc5358650f851bead7eececa2b /debuggerd/handler/debuggerd_handler.cpp
parent279cb8b39aeda9e8642a52794e6e67aa84fa2af7 (diff)
debuggerd_handler: fix prctl return value check.
Fixed this when I tested on internal, but failed to copy the fix over when submitting to AOSP. Bug: http://b/35070339 Test: `adb bugreport` on angler Change-Id: Ib84d212e5f890958cd21f5c018fbc6f368138d1e
Diffstat (limited to 'debuggerd/handler/debuggerd_handler.cpp')
-rw-r--r--debuggerd/handler/debuggerd_handler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/debuggerd/handler/debuggerd_handler.cpp b/debuggerd/handler/debuggerd_handler.cpp
index 156534e19..38a7be35f 100644
--- a/debuggerd/handler/debuggerd_handler.cpp
+++ b/debuggerd/handler/debuggerd_handler.cpp
@@ -218,7 +218,7 @@ static int debuggerd_dispatch_pseudothread(void* arg) {
close(pipefds[1]);
// Set all of the ambient capability bits we can, so that crash_dump can ptrace us.
- for (unsigned long i = 0; prctl(PR_CAPBSET_READ, i, 0, 0, 0); ++i) {
+ for (unsigned long i = 0; prctl(PR_CAPBSET_READ, i, 0, 0, 0) != -1; ++i) {
prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, i, 0, 0);
}