-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stderr.get_output() blocks #19
Comments
jedie
added a commit
to jedie/PyAdbUninstall
that referenced
this issue
Mar 3, 2019
Anthchirp
added a commit
that referenced
this issue
Mar 3, 2019
There may be cases where the stream reader can not finish even though the subprocess has already terminated. For example the subprocess can pass the stdout/stderr handles on to a daemon process which will keep them open. In those cases we need to stop reading at some point to continue the normal control flow. Proposed solution: wait for 1 second for the stream reader to catch up, and if the stream is still held open or the stream reader is still running ignore any further output and continue. Downside: this is essentially a memory leak as the stream reader thread may still linger on. To limit the potential damage add a check for the ._closed property in the main stream reader loop and terminate there. Attempt at resolving #19.
Anthchirp
added a commit
that referenced
this issue
Mar 3, 2019
There may be cases where the stream reader can not finish even though the subprocess has already terminated. For example the subprocess can pass the stdout/stderr handles on to a daemon process which will keep them open. In those cases we need to stop reading at some point to continue the normal control flow. Proposed solution: wait for 1 second for the stream reader to catch up, and if the stream is still held open or the stream reader is still running ignore any further output and continue. Downside: this is essentially a memory leak as the stream reader thread may still linger on. To limit the potential damage add a check for the ._closed property in the main stream reader loop and terminate there. Might resolve #19.
Could you have a look at bb71233 and see if that fixes it for you? |
Hm. No it still hangs... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I call
adb kill-server
, the process ends with exit code 0 but stderr.get_output() blocks.What I Did
The text was updated successfully, but these errors were encountered: