[issue24919] Use user shell in subprocess

2015-08-23 Thread Jan Studený
New submission from Jan Studený: According to POSIX specification the pathname of user shell is stored in SHELL (environmental variable, see http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08) so I think that is good idea to use that pathname instead of hardcoded on

[issue24919] Use user shell in subprocess

2015-08-23 Thread R. David Murray
R. David Murray added the comment: Thanks for the suggestion, but that would make programs using subprocess non-portable. There is an open issue to use the *default* shell instead of hard coding it (because the sh-alike is not at /bin/sh on, eg, Android), but using the user shell would break

[issue24919] Use user shell in subprocess

2015-08-23 Thread eryksun
eryksun added the comment: I expect Popen's shell=True option to use the same shell as os.system. The POSIX spec for the [system function][1] requires running sh, as follows: execl(, "sh", "-c", command, (char *)0); glibc uses "/bin/sh" for the shell path. Modifying the SHELL environment

[issue24919] Use user shell in subprocess

2015-08-23 Thread eryksun
eryksun added the comment: Here's the rationale given for ignoring SHELL in POSIX system(): One reviewer suggested that an implementation of system() might want to use an environment variable such as SHELL to determine which command interpreter to use. The supposed implementation