[Issue 14282] executeShell should can sh and ignore the SHELL env variable

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Mar 13 13:29:19 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14282

--- Comment #1 from Martin Nowak <code at dawg.eu> ---
Quote from
http://pubs.opengroup.org/onlinepubs/9699919799/functions/system.html

> 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 would use the default command interpreter if the one specified by the environment variable was not available. This would allow a user, when using an application that prompts for command lines to be processed using system(), to specify a different command interpreter. Such an implementation is discouraged. If the alternate command interpreter did not follow the command line syntax specified in the Shell and Utilities volume of POSIX.1-2008, then changing SHELL would render system() non-conforming. This would affect applications that expected the specified behavior from system(), and since the Shell and Utilities volume of POSIX.1-2008 does not mention that SHELL affects system(), the application would not know that it needed to unset SHELL.

--


More information about the Digitalmars-d-bugs mailing list