httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: cvs commit: apachen/src/main alloc.c util_script.c
Date Mon, 20 Oct 1997 19:06:28 GMT
Paul Sutton wrote:
> 
> On 20 Oct 1997 ben@hyperreal.org wrote:
> > ben         97/10/20 05:09:00
> >
> >   Modified:    src/main alloc.c util_script.c
> >   Log:
> >   Fix CGI under Win95 (plus some error checking). This needs doing more carefully.
> 
> I rather wish that these had been committed separately.

So do I, but life is short and CVS wasn't working.

> There are several
> important bug fixes in this patch, and a couple of other changes. For
> reference, they are:
> 
>   1.  Fix CGI so it works on Windows 95 (with / -> \ translation)
>   2.  Avoid "premature end-of-headers" error under CGI if the CGI cannot
>       be spawned
>   3.  Change the pipe mode from TEXT to BINARY
>   4.  Close second argument to dup2() in one case - is this
>       necessary?

No, that was left over from me thrashing around wildly trying to fix the
wrong problem.

> Incidently I'm not sure that patch for item 2 is correct. The
> spawn_child_err_core() function can still return -1, 0 or a PID from
> Windows. It should return 0 or a PID. A return value of -1 will be treated
> as a sucessful spawn by the parent, which is not correct.

Good point.

> Also if the
> return value is is 0 then the caller will log the spawn failure, so we
> don't need to do this within alloc.c (which is at a too low a level to log
> this anyway - it doesn't know the filename of the child process).
> 
> All of this can be fixed with this can be done with this simple patch
> (from mail I sent about this bug on May 17th).

OK, clever clogs. So fix it.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Mime
View raw message