commit | 8d76c45b3c026c289d22348fcd35db3c78caf79c | [log] [tgz] |
---|---|---|
author | Josh Gao <jmgao@google.com> | Fri Dec 11 10:52:55 2015 -0800 |
committer | Josh Gao <jmgao@google.com> | Fri Dec 11 15:10:12 2015 -0800 |
tree | 361b2b0e66dbafbc3dac6f3e2aaf2b2ec68ee08a | |
parent | 5500a9408f1b678ed87af85b94636ef930d60d02 [diff] |
adb: don't use setenv after forking. Previously, for `adb shell`, we were using setenv after forking to set up the child's environment. This would occasionally deadlock in the child, which would cause the main thread to deadlock waiting for the child to complete. This patch constructs the environment before forking and passes it to execle, eliminating the deadlock. Bug: http://b/25847115 Change-Id: I720d472770564b1449819ddaab945a89844244a8