homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Make subprocess.Popen aware of $SHELL
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: Arfrever, dcolish, eric.araujo, gregory.p.smith
Priority: normal Keywords: patch

Created on 2012年03月10日 00:23 by dcolish, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
popen_shell.diff dcolish, 2012年03月10日 00:23 Add $SHELL awareness to Popen review
Messages (4)
msg155274 - (view) Author: Dan Colish (dcolish) Date: 2012年03月10日 00:23
The hardcoding of /bin/sh in the Popen _execute_child method can be a point of frustration when so many users are used to their chosen environment shell. The module can easily support the re-use of the defined $SHELL variable. I've attached a patch which gives one way of doing this. Before I get into writing tests for this, I wanted to float the idea of adding this feature.
msg155351 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012年03月10日 21:35
Note that it’s already possible to use any shell with the "executable" argument.
Is there any official spec (i.e. POSIX) for the SHELL environment variable?
msg155356 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2012年03月10日 22:07
POSIX documents SHELL variable:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html 
msg155360 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2012年03月11日 00:10
Users who want to use the SHELL environment variable can do so on their own by using it as their executable and constructing an appropriate command line.
Allowing an environment variable to change the behavior of a program that assumes shell=True is going to be /bin/sh compatible by default (as it has been for ages) is a bad idea.
History
Date User Action Args
2022年04月11日 14:57:27adminsetgithub: 58450
2012年03月11日 00:10:33gregory.p.smithsetstatus: open -> closed
assignee: gregory.p.smith
resolution: rejected
messages: + msg155360
2012年03月10日 22:07:19Arfreversetnosy: + Arfrever
messages: + msg155356
2012年03月10日 21:35:46eric.araujosetnosy: + eric.araujo
messages: + msg155351
2012年03月10日 20:59:48pitrousetnosy: + gregory.p.smith

versions: - Python 3.1, Python 2.7, Python 3.2, Python 3.4
2012年03月10日 00:23:03dcolishcreate

AltStyle によって変換されたページ (->オリジナル) /