From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2469cce258f89848 X-Google-Attributes: gidfee84,public X-Google-Thread: f8b34,2469cce258f89848 X-Google-Attributes: gidf8b34,public From: hippo@garply.com (Hugh Messenger) Subject: Re: httpd 1.4 on OSF/1 problem Date: 1995/07/12 Message-ID: #1/1 X-Deja-AN: 106000948 references: organization: Net Results, Inc. newsgroups: comp.unix.osf.osf1,comp.infosystems.www.servers.unix In article , 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