Re: why not wrap fastcgi servers in a shell script?

Stanley Gambarin (
Fri, 07 Feb 1997 17:06:31 -0500

Message-Id: <>
To: Jim Johnstone <>
Subject: Re: why not wrap fastcgi servers in a shell script? 
In-Reply-To: Your message of "Wed, 05 Feb 1997 17:11:42 EST."
Date: Fri, 07 Feb 1997 17:06:31 -0500
From: Stanley Gambarin <>

> I start a fastcgi server like this:
> AppClass /project/tpf95/data1/dw/usr/jimj/www/fcgi/fcgiEcho.fcg -processes 1
> where fcgiEcho.fcg is a trivial ksh script to setup the environment:
> #!/bin/ksh
> . ./dw.env
> exec ./fcgiEcho
> where dw.env is the project standard env file setup script and fcgiEcho is
> the fast-cgi server (pretty much straight from the developers kit). 
> This all seems to work fine, even for our real servers. Is there some
> reason, though, that its a bad idea?
> TIA, Jim

		I don't know if that could be a possible problem, but what 
happens when the fastCGI application runs under one user but the script
sets a different euid.  It may also turn up some problems with authorization.
For the general case, you should not use such setup since it causes an extra
fork()/exec() combo, which is not very costly, but can easily be replaced by
the PassEnv and SetEnv directives, which are provided by Apache in mod_env.
						Just a piece of my mind.