facebookarchive / fb-adb

A better shell for Android devices
Other
1.14k stars 128 forks source link

Defer unix socket cleanup until after the shell exits #69

Closed c-ryan747 closed 5 years ago

c-ryan747 commented 5 years ago

At the moment when an adb shell command is run the cleanup for setting up a device socket is done as soon as connect_to_device_socket exits, meaning that theres a race between the shell command using the socket and it being torn down.

Changing connect_to_device_socket so it uses its parents reslist, effectively postponing the teardown till the command has run