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

Re: Implicit linking of local .so



Mads Bondo Dydensborg wrote:

> > > This assumes bash, doesnt it?
> >
> > Well, it assumes a shell called '/bin/sh' - which on all existing UNIX/Linux
> > varients is a 'Bourne-Shell' - or a close clone such as BASH. That's
> > what the '#! /bin/sh' line at the top of the script does.
> 
> I am aware of the meaning of #!/bin/sh
> What I meant was; doesn't the script _assume_ that /bin/sh is bash, by
> using the keyword "export"? (Or is it Posix shell also?).

Oh - I see.  'export' is a Bourne-shell thing - so it's bound to
be in the Posix spec.
 

> > Exporting LD_LIBRARY_PATH is certainly recommended.
> 
> I would argue against. You do not want to change the LD_LIBRARY_PATH for
> your current shell, only either the subshell or command you run.

That's what export does.

Without export, the variable is confined to the current shell
and is NOT passed on to daughter shells or programs.

With export, the variable is passed down to daughter shells
and programs - but not 'up' to parent shells or programs.

AFAIK, there is no way to make the change in a variable have
an effect on the script/program that created this shell. That
would be "A Bad Thing" indeed - which is why UNIX makes it
(essentially) impossible.

--
Steve Baker                (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc.      (817)619-2466 (Fax)
Work: sjbaker@hti.com      http://www.hti.com
Home: sjbaker1@airmail.net http://web2.airmail.net/sjbaker1