summaryrefslogtreecommitdiff
path: root/libs/gui/ConsumerBase.cpp
diff options
context:
space:
mode:
author Yifan Hong <elsk@google.com> 2018-08-02 14:09:55 -0700
committer Yifan Hong <elsk@google.com> 2018-08-02 14:22:12 -0700
commitb9d19c87abce709ba11da4f0307cc6922b9aa52d (patch)
tree5f341a23550649b06b3b37532774a171d0f24998 /libs/gui/ConsumerBase.cpp
parent519485d161e1cdcb11a1898b065710a5d9239cb5 (diff)
lshal: close fd before joining thread
In ~PipeRelay, since the data is no longer needed, just close the fd before joining the thread. In previous code, 'lshal debug' can hang: - lshal read() waiting for data in RelayThread - lshal send fd to service in main thread - service close the fd - service returns in debug() call - lshal calls ~PipeRelay - lshal read() is still blocking because it does not receive the signal But, since the service has already end the debug() call, the fds can be closed to bail out from blocking read(). Test: 'while true; do lshal debug ...; done' does not hang Fixes: 111997867 Change-Id: I90db486b0a6598bd9998ed904dc0c757dfa57e0e
Diffstat (limited to 'libs/gui/ConsumerBase.cpp')
0 files changed, 0 insertions, 0 deletions