Re: multi-threaded applications and fastcgi

George Feinberg (
Wed, 10 Jul 1996 14:08:04 -0400 (EDT)

From: George Feinberg <>
Message-Id: <>
Subject: Re: multi-threaded applications and fastcgi
Date: Wed, 10 Jul 1996 14:08:04 -0400 (EDT)
In-Reply-To: <>

Ok, I'll answer my own question.  It appears to me, after
reading the source code for FastCGI, that it cannot, in
fact, support multi-threaded C or C++ applications.

For one, it puts the current request's environment in the
process-global char ** environ.  For two, it appears that the FCGI
stdin, stdout, and stderr are also in a process-global data structure
(FCGI_FILE _fcgi_sF[3], defined in fcgi_stdio.c).  There may be some
other problems, as well, but that's as far as I looked.  FYI,
the version I'm looking at, for code and doc is:
	Version 1.3.1, 6 May 1996

Anyone from OpenMarket out there?  I would very much like to support
FastCGI without hacking your source code to make it thread-safe,
and hooking into it below the level of the currently exposed API.
I have no problem using some special-case interfaces, since I
really don't care about non-FastCGI compatibility; it would just
be nice if those interfaces were publically available in the

(It would also be nice if the documentation were correct with
respect to multi-threaded programs.  At best, it's misleading).

Thanks for listening,

George M. Feinberg                       Phone:  617-674-5359
Object Design, Inc.			 FAX:    617-674-5459
25 Mall Rd.	 	       
Burlington, MA 01803-4194