help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Odd effects from setting SHELL?


From: Philip Guenther
Subject: Re: Odd effects from setting SHELL?
Date: Fri, 22 Jun 2007 13:34:31 -0600

On 6/22/07, David Boyce <address@hidden> wrote:
At 10:23 AM 6/22/2007, Christian Convey wrote:
...
>So maybe bourne-based shells just don't have this as an issue at all?

Yes, that's right. The issue is specific to csh-style shells and is a
design flaw. Bourne shells have no such problem which is why setting
SHELL to anything but /bin/sh is so stringly deprecated.

The SUS specification (i.e., the evolution of POSIX) requires that the
shell support ENV and only process it when the shell is interactive.
However, many older implementations also processed it in
non-interactive invocations.  That was true in Solaris 9 and earlier,
for example, as well as in OpenBSD 4.1 and earlier.

In addition, some bourne-like shells will process some rcfiles in
non-interactive invocations.  For example, bash, when not in POSIX
mode, will source $BASH_ENV in all types of invocations.


So, you'll have much fewer problems with sh, especially as people
update to the standard, but keep your eyes open for older, broken
implementations and those that purposely don't comply.

(It's like the old quip "Trust in god, but keep rowing for shore.")


Philip Guenther




reply via email to

[Prev in Thread] Current Thread [Next in Thread]