Forum

having problems with FCGX_SetExitStatus

f.haferkorn
15 July 2013, 16:03
Hello,

Hiawatha version: 8.8
Operating System: Windows 7 (cygwin)

I have problems to set the Exit Code of a FastCGI Script I am using inside main!.
What is wrong in this code?
+++++++++++++++++++
FCGX_Init();
sock = FCGX_OpenSocket(socketName, 5);
for (FCGX_InitRequest(&request, sock, 0); // Init FCGX Operation
FCGX_Accept_r(&request) >= 0;
)
{
res = handle_request(&request);

FCGX_SetExitStatus(510, request.err);
FCGX_SetExitStatus(510, request.out);
FCGX_SetExitStatus(510, request.in);
FCGX_Finish_r(&request);
}
+++++++++++++++++++
Yours,
Frank Haferkorn
Hugo Leisink
15 July 2013, 16:51
I have no idea what FCGX_SetExitStatus() does, but to set the exit code, a CGI application must use a 'Status: <code>' HTTP header.
This topic has been closed.