comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL and UNIX setenv
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL and UNIX setenv [message #25510 is a reply to message #25428] Tue, 19 June 2001 01:41 Go to previous messageGo to previous message
nmw is currently offline  nmw
Messages: 18
Registered: January 1995
Junior Member
In article <Pine.LNX.4.21.0106190817360.16998-100000@homer.atm.ox.ac.uk>, Randall Skelton <rhskelto@atm.ox.ac.uk> writes:
>> I think you might need to add the path to your default .profile/.login/.cshrc/.whatever
>> (which I am assuming you're not doing - I really can't tell from "I tried to append the
>> /usr1/guest/bin/ directory to my UNIX path before starting an IDL session")
>>
>> I *think* when you use SPAWN, the subsequent shell in which the SPAWN command argument is
>> executed is *not* the one you started IDL in and therefore has no knowledge of what you
>> may have explicitly defined. The same sort of thing happens in make files in Unix.
>
> Paulv is indeed correct here. Using spawn will start a *new* process
> (with a unique pid) and therefore it does not interact or have any
> knowledge of the shell or environment variables you had when you started
> IDL.

That's not quite right. When a new process is started it gets the same environment
as its parent (that's the purpose of environment variables in contrast to "normal"
variables). When you exec another executable with exec() or execl() it will still
have the same environment. You can use execvp(), execlp() and pass it a different
environment if required.

If the process created exec's a shell which invokes a startup script such as .profile,
.cshrc, .login etc which has hardcoded environment settings in it (e.g. path=/adf:/dea)
then this will override the environment passed down from the parent.


--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: regression with poisson models
Next Topic: 10 bit packed as 8 bit unpacking

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:24:42 PDT 2025

Total time taken to generate the page: 0.00401 seconds