Message271418
An interesting read, but I am lost in what the goal is.
e.g., on AIX, which I know well, the system default is /bin/ksh (aka /usr/bin/ksh). However, /bin/sh (/usr/bin/sh) is available as well.
My expectation is that on Linux the default shell is /bin/bash, and like AIX /bin/sh is also available.
/bin/sh, /bin/ksh, /bin/bash are all (potentially) default shells. However, something every posix system is "sh" aka borne shell.
Aside: windows is different, and I expect has a different syntax.
So, if the goal is to GET the pathname of the so-called "default" shell -again, interesting - BUT - what does that buy me?
For Popen or now subprocess I would want a consistent shell syntax, i.e., borne shell on posix, cmd.exe on windows, and whatever is correct on platforms that do not fit in these two.
Hence, on posix platforms where /bin/sh does not exist (hard)code the correct path for that platform.
FYI: CS_PATH does not exist on AIX
IMHO: (as others have stated) having . in PATH is bad for security, being dependent on PATH opens other security concerns as well.
IMHO2: KISS principle. After several years there is still no consenus, so make it simple - the popen and subprocess shell is one of /bin/sh, cmd.exe, or some other "hard-coded" shell.
(Although I thought that subprocess called "program" directly. Python is still new, so if not applicable for subprocess - please ignore
rereading, direct call would be when shell=False I expect.
Anyway, my two cents. |
|
Date |
User |
Action |
Args |
2016-07-26 22:46:09 | Michael.Felt | set | recipients:
+ Michael.Felt, gregory.p.smith, pitrou, christian.heimes, ned.deily, ezio.melotti, eric.araujo, r.david.murray, asvetlov, chris.jerdonek, neologix, akira, xdegaye, Roman.Evstifeev, serhiy.storchaka, eryksun, lyapun, WanderingLogic, yan12125 |
2016-07-26 22:46:09 | Michael.Felt | set | messageid: <1469573169.63.0.805733940238.issue16353@psf.upfronthosting.co.za> |
2016-07-26 22:46:09 | Michael.Felt | link | issue16353 messages |
2016-07-26 22:46:09 | Michael.Felt | create | |
|