[New-bugs-announce] [issue24919] Use user shell in subprocess

Jan Studený report at bugs.python.org
Sun Aug 23 23:47:42 CEST 2015


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 one.
Change is only in one line of subprocess package to use SHELL environmental variable and use hardcoded shell pathname as fallback.

lines 1431-1433
```
            if shell:
                args = ["/bin/sh", "-c"] + args
                if executable:
```

to

```
            if shell:
                args = [os.environ.get("SHELL","/bin/sh"), "-c"] + args
                if executable:
```

----------
components: Library (Lib)
messages: 249023
nosy: Jan Studený
priority: normal
severity: normal
status: open
title: Use user shell in subprocess
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24919>
_______________________________________


More information about the New-bugs-announce mailing list