Environment variables ?

Environment variables ?

Post by gsim.. » Mon, 24 Jul 2000 04:00:00



Hello,

It's probably an easy one, but i'm wondering if the environment
variables in the shell are accessible within a C program (run within
the shell), and if so, how ?

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Environment variables ?

Post by gsim.. » Mon, 24 Jul 2000 04:00:00


Hello,

It's probably an easy one, but i'm wondering if the environment
variables in the shell are accessible within a C program (run within
the shell), and if so, how ?

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Environment variables ?

Post by David Schwart » Mon, 24 Jul 2000 04:00:00



> Hello,

> It's probably an easy one, but i'm wondering if the environment
> variables in the shell are accessible within a C program (run within
> the shell), and if so, how ?

        'man environ', 'man getenv'. I'm assuming that by 'accessible' you mean
read access. One process cannot change the environment of another
process. After a process is created, only that process can change its
environment.

        Otherwise, lots of reasonable could would break.

        DS

 
 
 

Environment variables ?

Post by Oleg O Orlo » Tue, 25 Jul 2000 04:00:00


dsg


Quote:> Hello,

> It's probably an easy one, but i'm wondering if the environment
> variables in the shell are accessible within a C program (run within
> the shell), and if so, how ?

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

Environment variables ?

Post by Oleg O Orlo » Wed, 26 Jul 2000 04:00:00


posting test


Quote:> Hello,

> It's probably an easy one, but i'm wondering if the environment
> variables in the shell are accessible within a C program (run within
> the shell), and if so, how ?

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

Environment variables ?

Post by Oleg O Orlo » Wed, 26 Jul 2000 04:00:00


sdsdf


Quote:> Hello,

> It's probably an easy one, but i'm wondering if the environment
> variables in the shell are accessible within a C program (run within
> the shell), and if so, how ?

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

Environment variables ?

Post by cLIeNUX us » Wed, 26 Jul 2000 04:00:00



>posting test


>> Hello,

>> It's probably an easy one, but i'm wondering if the environment
>> variables in the shell are accessible within a C program (run within
>> the shell), and if so, how ?

>> Sent via Deja.com http://www.deja.com/
>> Before you buy.

children get thier state from thier parents. Who spawned who?
In C you can see what Dad left you with getenv.


 
 
 

Environment variables ?

Post by Ande » Wed, 26 Jul 2000 04:00:00


using getenv(var name) you can get the value of set env variables.
putenv(var name) will modify those values.  You cannot create variables
except for the current or sub shells.

Ande


> Hello,

> It's probably an easy one, but i'm wondering if the environment
> variables in the shell are accessible within a C program (run within
> the shell), and if so, how ?

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

1. Why does the cgi environment not inherit environment variables?

When using apache it normally inherits the environment in which it was
started and keeps this environment for executing cgi scripts. For example:
if root has oracle environment variables such as ORACLE_SID set when
starting the server then these are normally available to cgi scripts when
they execute much like the path is. However sometimes and specifically this
time they are not. Could someone explain how this works? It seems to be
somewhat random to me. I've had situations where various instances of the
server had different paths than others.

I'm running apache 1.3.4 and apache 1.3.6 on solaris 2.7 with mod_perl 1.18
and 1.19 respectively.

Matt

2. help with FIPS and Win95

3. how to export shell environment variables to the primary environment?

4. Solaris via serial cable / network

5. c shell script; Howto use environement variables to build environment variables and take their value

6. Linux Users' Group of Davis, October 3 - Parallel Programming

7. Difference between shell variables and environment variables!

8. screen saver doesnt work!

9. difference between shell variable and environment variable

10. How to get value of environment variable in variable name?

11. 2.x mod_ssl X.509 DN environment variable attributes

12. Cron Problem and Environment Variables

13. environment variable