why not wrap fastcgi servers in a shell script?

Jim Johnstone (jimj@lexis-nexis.com)
Wed, 5 Feb 1997 17:11:42 -0500

Date: Wed, 5 Feb 1997 17:11:42 -0500
Message-Id: <199702052211.RAA11759@seahawks.lexis-nexis.com>
From: Jim Johnstone <jimj@lexis-nexis.com>
To: fastcgi-developers@OpenMarket.com
Subject: why not wrap fastcgi servers in a shell script?


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

config data:

Name: Jim Johnstone
Email: jimj@lexis-nexis.com
OS: Sun Solaris 2.5.1
Web Server: Apache Web Server Version: 1.2b6
FastCGI application's language: C++, Solaris 4.0.1
FastCGI Developer's Kit                 Version: 1.5.1
mod_fastcgi (if applicable)             Version: Got latest in late January
Directives:
    AppClass:
AppClass /project/tpf95/data1/dw/usr/jimj/www/fcgi/fcgiEcho.fcg -processes 1
AppClass /project/tpf95/data1/dw/usr/jimj/www/fcgi/fcgiLongTest.fcg -processes 1
AppClass /project/tpf95/data1/dw/usr/jimj/www/fcgi/fcgiEchoStderr.fcg -processes 1
    ExternalAppClass:
        None 
    Other:
        AddType application/x-httpd-fcgi fcg