Skip to content

[3.7] bpo-32844: Fix a subprocess misredirection of a low fd (GH5689)#6262

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-0e7144b-3.7
Mar 26, 2018
Merged

[3.7] bpo-32844: Fix a subprocess misredirection of a low fd (GH5689)#6262
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-0e7144b-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented Mar 26, 2018

Copy link
Copy Markdown
Contributor

bpo-32844: subprocess: Fix a potential misredirection of a low fd to stderr.

When redirecting, subprocess attempts to achieve the following state:
each fd to be redirected to is less than or equal to the fd
it is redirected from, which is necessary because redirection
occurs in the ascending order of destination descriptors.
It fails to do so in a couple of corner cases,
for example, if 1 is redirected to 2 and 0 is closed in the parent.
(cherry picked from commit 0e7144b)

Co-authored-by: Alexey Izbyshev izbyshev@users.noreply.github.com

https://bugs.python.org/issue32844

bpo-32844: subprocess: Fix a potential misredirection of a low fd to stderr.

When redirecting, subprocess attempts to achieve the following state:
each fd to be redirected to is less than or equal to the fd
it is redirected from, which is necessary because redirection
occurs in the ascending order of destination descriptors.
It fails to do so in a couple of corner cases,
for example, if 1 is redirected to 2 and 0 is closed in the parent.
(cherry picked from commit 0e7144b)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@izbyshev and @gpshead: Backport status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 0545563 into python:3.7 Mar 26, 2018
@miss-islington

Copy link
Copy Markdown
Contributor Author

Thanks!

@miss-islington miss-islington deleted the backport-0e7144b-3.7 branch March 26, 2018 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants