summaryrefslogtreecommitdiff
path: root/debuggerd/debuggerd.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2016-06-17 14:53:57 -0700
committerJosh Gao <jmgao@google.com>2016-06-20 11:40:16 -0700
commit344778da411ebb47966961f3a70ca0848425194f (patch)
tree0f07f3dc9c7c2180e856a6f7d69928758d26d88d /debuggerd/debuggerd.cpp
parent2d690a920f1b2f67e267160083aab711b35ab3fc (diff)
adb: fix fd double close, Subprocess lifetime issue.
This commit fixes two somewhat related issues in shell_service. - The fd returned by StartSubprocess is owned by a unique_fd contained in the Subprocess object, but also gets closed by the caller. Resolve this by duping the returned file descriptor. - A Subprocess object can be destroyed immediately after its initial construction in StartSubprocess if we're sufficiently unlucky. Split up the fork/exec and "start management thread" steps, so that we can safely do everything we need to do on the Subprocess before handing it over to the thread that'll eventually destroy it. Bug: http://b/29254462 Change-Id: Id9cf0b7e7a7293bee7176919edc758597691c636
Diffstat (limited to 'debuggerd/debuggerd.cpp')
0 files changed, 0 insertions, 0 deletions