commit | 2f6045afcafd9476ad66b324200ba97bacbc443b | [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 | 814c9f5e26a8d78ac7706bd768dca334b6d130e7 | |
parent | 2d6b126dae13fba8aa37ac8a00ecdaa052d744c8 [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