Fix adb dumpsys resource hang
The process creates a pipe and dup the output file descriptor passed to
app processes. The dup output file descriptor is not closed after
all apps have finished dumping tasks. But, the console is blocked
for reading from the input file descriptor. That's why
`adb shell cmd resources dump com.android.systemui` hangs in very high
frequency.
This patch makes sure the dup output file descriptor is closed after
all apps processes have finished dumping tasks.
Fixes: 265228474
Bug: 243579631
Test: adb shell dumpsys -t 20 resources
Change-Id: I0c9d5556a03053256c9d4ed99858018627630075
1 file changed