# Support FastCGI

> [HTML Version](supportfastcgi.htm)

_Updated November 2025_

**xcall CGIUTL, CGIOP\_GETREQ, status**

_Opcode_ 10, CGIOP\_GETREQ, is used to upport FastCGI, although it also works in normal CGI mode and is critical to enabling support for either mode in the same program. 

**Parameters**

_status_  ([Num](num.md) signed)

returns 0 if a request is available to process, or -1 if not, in which case the application should terminate.

**Comments**

For FastCGI mode requests after the first one for the instance of the application server, this call will sleep until a request is available or the web server tells us to exit, or an error occurs.

When used in normal CGI mode, the first call will return 0 (just as it does for FastCGI mode), but the second call will return -1, since normal CGI mode only supports one request per application server instance.

Note that in FastCGI mode, subsequent calls after the first one will block while waiting for a new request. The wait will be terminated only by one of the following events:

•	Arrival of a new request.

•	The web server deciding to terminate the application, based on minimum/maximum/timeout parameters in the server's FastCGI or fcgid configuration.

•	A SIGINT or SIGTERM or SIGKILL signal sent by another Linux process.

•	Termination by the Windows Task Manager.

Typically, none of those events are trappable, so the process will disappear but the job may remain in the job table as a zombie until it is replaced by a newly launched job.

See [FastCGI](fastcgi.md) for an example and further details.