[ale] Bash scripts for idiots...

Benjamin Scherrey scherrey at switchco.com
Sun Nov 7 14:13:46 EST 1999


I understand that its intentional and agree that a new program should
get its own inherited copy of the environment but a script is really
just a bunch of shell commands that, had they been executed manually,
would run within the context of the current environment. A script
starting a new process should be the option, not the default, IMHO. Of
course, this is more an artifact of UNIX originally being a process
oriented architecture rather than thread-based. I guess changing that
behaviour might accidentally break one or two UNIX installs out
there... :-)

	thanx for your help & later,

		Ben Scherrey

Wandered Inn wrote:
<snip>
>  When you use the:
> 
> . myshell.sh
> 
> construct, you are invoking the shell within your current process and
> not starting up a child process.
> 
> This is intentional by the way.  Think about how huge your environment
> would get if everytime you executed a process all the variables and such
> became a part of your existing environment.  On a multi-user system such
> as Linux, you'd quickly run out of resources.

...actually, unless environment variables are implemented using a
copy-on-write technique, you're getting a worse case scenario since
every time you start a process the environment gets copied. Am I
mistaken?






More information about the Ale mailing list