Rick Mando Rick Mando - 2 years ago 81
Perl Question

Why can't FCGI independently do it's job?

Why must a program have the following lines..

while ( FCGI_Accept () >= 0 ) {
FCGI_Finish ();
}


shouldn't the idea of " loading a program into the memory " be the job of FCGI itself ?

Why does the program have to have the lines above?


" FCGI loads the program into the memory once and re-uses it over and
over again ".


Well I suppose the statement above can not be true if the program itself also has to work with FCGI.

Perhaps the more appropriate description would be..


FCGI works with the program itself to determine if it should be loaded
into the memory and re-used over and over again.

Answer Source

FCGI, short for FastCGI, is a protocol. Its purpose is to allow one process to accept multiple requests without being the web server itself. This was an upgrade compared to CGI, in which the web server starts a process to handle each request. The "loads the program into memory" sentence most likely refers to this capability to load the program ahead of time.

Being a protocol, it only functions when both partners (web server and fcgi program) both adhere to it. It doesn't "do" anything on its own, though it wouldn't be surprising to see modules and libraries implementing the protocol to be named after it.

Your question, regarding FCGI_Accept and FCGI_Finish, thus relates to the API of a library implementing the FastCGI protocol, and is implementation specific.

So, having established that "FCGI" is not one thing, it clearly cannot have the job of loading programs. The linker, actually named ld.so for loader of shared objects, does have that job.

Where did you find the line of documentation you're objecting to?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download