* Re: httpd 1.4 on OSF/1 problem
1995-07-11 4:00 httpd 1.4 on OSF/1 problem Hugh Messenger
@ 1995-07-12 4:00 ` Hugh Messenger
0 siblings, 0 replies; 2+ messages in thread
From: Hugh Messenger @ 1995-07-12 4:00 UTC (permalink / raw)
In article <hippo-1107951637580001@cerebus.garply.com>, hippo@garply.com
(Hugh Messenger) wrote:
> I'm still not having any luck getting http 1.4 (or Apache 0.6) to work.
> Any kind of script processing (mainly CGI) still randomly breaks.
I finally tracked this down. The following fix to httpd_script.c seems to
cure it:
foo# diff http_script.c http_script.c.dist
313d312
< sleep(1); /* $$$ hugh */
Or, if you prefer ...
int cgi_stub(char *method, char *path, char *path_args, char *args,
char **env, struct stat *finfo, int in, FILE *out)
{
[blah blah blah]
if(pipe(p) < 0)
die(SERVER_ERROR,"httpd: could not create IPC pipe",out);
if((pid = fork()) < 0)
die(SERVER_ERROR,"httpd: could not fork new process",out);
nph = (strncmp(argv0,"nph-",4) ? 0 : 1);
if(!pid) {
[blah blah blah]
}
else {
sleep(1); /* $$$ hugh */
close(p[1]);
}
[blah blah blah]
}
> -- hugh
-- hugh
^ permalink raw reply [flat|nested] 2+ messages in thread