httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Stoddard <>
Subject 16 bit CGIs on NT
Date Fri, 29 Jan 1999 17:03:30 GMT
After months off, I've finally started back working on the patch to
retrieve script interpreters out of the Win32 registry (configurable).
I'm trying to knock out some of the reported CGI PRs in the process, and
I've run into a problem with 16 bit CGIs. 

16bit CGIs fail -intermittently-. In the failure case, the
CreateProcess() call (in util_script.c) is successful, but all the
fields in the PROCESS_INFORMATION structure (pid, thread handle, etc.)
are NULL or 0. 

mod_cgi is failing the request because of the pid being 0. I added WIN32
specific code to accept a 0 PID. Now the ReadFile() in buff.c is

I've made two interesting observations:
Observation 1:
The CGI script is name is test16.exe. If I request (via the browser)
cgi-bin/test16, I never see the problem. In this case, Apache intuits
that I need to add the .exe extension. Apache adds the extension (before
the call to ap_call_exec), stats the file, then proceeds to run. 

If I request cgi-bin/test.exe, it almost always fails. I expect the
timing of the last stat in relation to the CreateProcess may have
something to do with this behaviour.

Observation 2:
still see pid = 0, but the script runs and I don't see the problem.


Bill Stoddard

View raw message