httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <stodd...@raleigh.ibm.com>
Subject Re: cvs commit: apache-2.0/src/lib/apr/threadproc/win32 proc.c
Date Fri, 28 Jan 2000 16:15:44 GMT


> >   Fix some return codes and leave the new process handle open. In
general,
> >   the parent process should explicitly close the handle if it does not
need
> >   it. And Apache requires the handle for free_proc_chain clean-up
processing.
> >
> >   Revision  Changes    Path
> >        if (CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, pEnvBlock,
attr->currdir,
> >                          &attr->si, &(*new)->pi)) {
> >   -        if (attr->detached) {
> >   -            CloseHandle((*new)->pi.hProcess);
> >   -        }
> >            if (attr->child_in) {
> >                ap_close(attr->child_in);
> >            }
>
> If we want to keep the process handle open, shouldn't we just be not
> opening the file detached?  I don't have the answer with me, but ISTR a
> peice of code from Apache 1.3 (or somewhere) that closed the handle when
> detaching the process.
>
I think all the std handle redirection stuff will not work if the process is
not created detached. And I think Apache 1.3 may have been broken in this
regard as well. There are reports of CGI scripts not being terminated at
Apache shutdown. I plan to test this, just don't have the time to right now.

Bill


Mime
View raw message