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.

Author Michael.Felt
Recipients Michael.Felt, Roman.Evstifeev, WanderingLogic, akira, asvetlov, chris.jerdonek, christian.heimes, eric.araujo, eryksun, ezio.melotti, gregory.p.smith, lyapun, ned.deily, neologix, pitrou, r.david.murray, serhiy.storchaka, xdegaye, yan12125
Date 2016-07-26.22:46:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1469573169.63.0.805733940238.issue16353@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-07-26 22:46:09Michael.Feltsetrecipients: + 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:09Michael.Feltsetmessageid: <1469573169.63.0.805733940238.issue16353@psf.upfronthosting.co.za>
2016-07-26 22:46:09Michael.Feltlinkissue16353 messages
2016-07-26 22:46:09Michael.Feltcreate