History log of /system/core/base/include/android-base/test_utils.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
69d2f9819785775c86137f5ff3298cd46b14a516 23-Mar-2016 Josh Gao <jmgao@google.com> 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.

Also includes squashed patches from AOSP master that allow for use of
unique_fd inside adb.

Bug: http://b/29254462
Change-Id: Id9cf0b7e7a7293bee7176919edc758597691c636
(cherry picked from commit c0e6e40cc916747a0a22c2538874348cda0ef607)
(cherry picked from commit 54c72aaccc45edf4832cfdc5053d9ae6acc9bcdf)
(cherry picked from commit 2c5d1d7cd914ec8ebf76c8a59d0889ebf5b538cd)
(cherry picked from commit 2a7b86337f7b149887588e4df532272abe3e931c)
(cherry picked from commit 13ea01db451b3993d175110a3336a58482be883d)
(cherry picked from commit 344778da411ebb47966961f3a70ca0848425194f)
/system/core/base/include/android-base/test_utils.h
f2584be414037aaab9e344bc9f65872da624d9f0 07-Dec-2015 Elliott Hughes <enh@google.com> Rename base/ to android-base/.

Bug: http://b/26023797
Change-Id: Ie6c63bf86bed05faab87d290de6f34d9af3532a8
/system/core/base/include/android-base/test_utils.h