Skip to content

Conversation

@miss-islington
Copy link
Contributor

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

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 [email protected]

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 <[email protected]>
@miss-islington
Copy link
Contributor Author

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

@miss-islington miss-islington merged commit 57db13e into python:3.6 Mar 26, 2018
@miss-islington
Copy link
Contributor Author

Thanks!

@miss-islington miss-islington deleted the backport-0e7144b-3.6 branch March 26, 2018 20:43
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