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

gh-87452 Making returncode unreliability explicit #92181

Merged
merged 19 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Doc/library/subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -894,8 +894,10 @@ The following attributes are also available:

.. attribute:: Popen.returncode

The child return code, set by :meth:`poll` and :meth:`wait` (and indirectly
by :meth:`communicate`). A ``None`` value indicates that the process
The child return code. Initially ``None``, :attr:`returncode` is set by
:meth:`poll` and :meth:`wait` after process termination is observed.

A ``None`` value indicates that the process
hasn't terminated yet.
gpshead marked this conversation as resolved.
Show resolved Hide resolved

A negative value ``-N`` indicates that the child was terminated by signal
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Here we make it explicit that the returncode attribute can be outdated and then that the returncode is most reliability found by using poll().