You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2018-03-26.21:03:05.987>created_at=<Date2018-02-14.21:10:48.727>labels= ['extension-modules', 'type-bug', 'library', '3.7']
title='subprocess may incorrectly redirect a low fd to stderr if another low fd is closed'updated_at=<Date2018-03-26.21:03:05.986>user='https://github.com/izbyshev'
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 if a low fd (< 2) is redirected to stderr and another low fd is closed, which may lead to an incorrect redirection, for example:
$ cat test.py