Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Aug 1998 15:41:29 -0500 (EST)
From:      Alfred Perlstein <bright@hotjobs.com>
To:        Matthew Hagerty <matthew@wolfepub.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Environment of a process
Message-ID:  <Pine.BSF.3.96.980831153925.17400E-100000@bright.fx.genx.net>
In-Reply-To: <3.0.3.32.19980831150336.007233bc@wolfepub.com>

next in thread | previous in thread | raw e-mail | index | archive | help
man exec, look at:

     int
     exect(const char *path, char *const argv[], char *const envp[])
 
also note getenv(3), man 3 getenv

good luck,
Alfred Perlstein - Programmer, HotJobs Inc. - www.hotjobs.com
-- There are operating systems, and then there's FreeBSD.
-- http://www.freebsd.org/                        3.0-current

On Mon, 31 Aug 1998, Matthew Hagerty wrote:

> Greetings,
> 
> Where does a process get its environment if it is not executed from the
> command line?  I have a program that connects to a database and relies on
> several ENV VARS to be set.
> 
> I solved the problem with a shell script that wraps the program like this:
> 
> #!/bin/sh
> 
> set var;export
> set var;export
> set var;export
> 
> call program
> exit
> 
> There has to be a more efficient way to do this?!  This particular program
> is run as a CGI and wrapping it in a shell adds overhead that I'm trying to
> cut down on.
> 
> Any insight would be greatly appreciated.
> 
> Thanks,
> Matthew
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980831153925.17400E-100000>