From owner-freebsd-hackers Mon Aug 31 11:57:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA10015 for freebsd-hackers-outgoing; Mon, 31 Aug 1998 11:57:33 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from firebat.wolfepub.com (firebat.wolfepub.com [206.250.193.44]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA10001 for ; Mon, 31 Aug 1998 11:57:26 -0700 (PDT) (envelope-from matthew@wolfepub.com) Received: from ricecake.fastnet0.net (niu-ppp202.triton.net [209.172.4.202]) by firebat.wolfepub.com (8.9.0/8.9.0) with SMTP id OAA02163 for ; Mon, 31 Aug 1998 14:55:48 -0400 (EDT) Message-Id: <3.0.3.32.19980831150336.007233bc@wolfepub.com> X-Sender: matthew@wolfepub.com X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.3 (32) Date: Mon, 31 Aug 1998 15:03:36 -0400 To: hackers@FreeBSD.ORG From: Matthew Hagerty Subject: Environment of a process Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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