summaryrefslogtreecommitdiff
path: root/libsparse/sparse.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2020-05-19 20:41:36 -0700
committerJosh Gao <jmgao@google.com>2020-05-19 20:54:40 -0700
commitbe41ae566617bc6e063011b1216a0aaa3e9ca80d (patch)
tree83ebf71b6755e0932f141078db87b90400fa1b54 /libsparse/sparse.cpp
parent1fbb1b8718e9d7f7e2f88c4bce5cec03654a32d7 (diff)
adb: fix flakiness in PTY shell protocol.
When a subprocess closes its PTY slave, the master fd will report POLLHUP when polled. This leads to us prematurely tearing everything down, without reading out output that's been written to the PTY. Resolve this by waiting until the fd no longer reports POLLIN. Bug: http://b/156551485 Bug: http://b/156552734 Test: `adb shell 'X=0; while /data/nativetest64/adbd_test/adbd_test --gtest_filter="ShellServiceTest.*Pty*" >/dev/null 2>&1; do X=$((X+1)); echo $X; done'` for 1000 iterations (failed within 20, previously) Test: test_device.py Change-Id: Ie591e0cafb532cd6cebdf6f356dc967565b5a2d9
Diffstat (limited to 'libsparse/sparse.cpp')
0 files changed, 0 insertions, 0 deletions