Skip to content
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

Fix bogus warning message "subprocess is still running" #1077

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

schroeding
Copy link
Contributor

Fixes #1073. Popen in the subprocess module holds the exit code of the process in its internal state, which is only set if the provided methods to wait for process termination in the Popen class are used or poll is called.

If the exit code is not set, a bogus warning message occurs on destruction of the object - to prevent it, we can explicitly call poll after process termination to update the exit code.

schroeding and others added 2 commits September 1, 2024 20:23
…object

Popen in the subprocess module holds the exit code of the process in its internal state,
which is only set if the provided methods to wait for process termination are used
or poll is called. If the exit code is not set, a bogus warning message occours on
destruction of the object.
@PhilippWendler PhilippWendler merged commit 52a27bd into main Sep 2, 2024
15 checks passed
@PhilippWendler PhilippWendler deleted the fix-bogus-subprocess-warning branch September 2, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Fix warnings about "subproccess is still running"
2 participants