diff options
| author | Josh Gao <jmgao@google.com> | 2016-01-19 16:21:17 -0800 |
|---|---|---|
| committer | Josh Gao <jmgao@google.com> | 2016-01-20 11:40:31 -0800 |
| commit | c65fae9ef56163d17bcc86b6b6324be2b56b4aa5 (patch) | |
| tree | 95483013957efc6da3241d8f84c973778b56e19a /adb/shell_service.cpp | |
| parent | d0009911de67f0625df8175bd298fa3863c1879d (diff) | |
adbd: don't leave zombies when subprocess creation fails.
Bug: http://b/26660675
Change-Id: I8e65d51af73f409c30be47575f76bc6b0f227c54
Diffstat (limited to 'adb/shell_service.cpp')
| -rw-r--r-- | adb/shell_service.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/adb/shell_service.cpp b/adb/shell_service.cpp index 366ed074a7..95dff117e8 100644 --- a/adb/shell_service.cpp +++ b/adb/shell_service.cpp @@ -233,6 +233,7 @@ Subprocess::Subprocess(const std::string& command, const char* terminal_type, } Subprocess::~Subprocess() { + WaitForExit(); } bool Subprocess::ForkAndExec() { @@ -432,7 +433,6 @@ void* Subprocess::ThreadHandler(void* userdata) { "shell srvc %d", subprocess->local_socket_fd())); subprocess->PassDataStreams(); - subprocess->WaitForExit(); D("deleting Subprocess for PID %d", subprocess->pid()); delete subprocess; |
