Ryan Bloom wrote:
You could on Unix, but on Windows there is no fork command.  It is
done with CreateProc (or something like that), which doesn't have
flexibility that fork has.

On windows, when we invoke CreateProc, the listeners should initially be
inherited.  But as they are initialized in the child, they should then be
flagged non-inherited.

This is simple for filesystem handles.  Unfortunately, with LSP (layered service
providers) the "socket handle" might not reflect a win32 handle (!)  This would
obviously mess up handle inheritence rules.

Going back to the first incident...

> The created process is intended to remain running regardless of whether the
> Apache server is running.  I'm noticing that after the process is created,
> and the Apache server is stopped and I attempt to restart it, I get an
> indication that the socket (port 80) is in use and Apache won't start.

When is this created process launched?  During the -parent- processing.  Of
course all of the shared resources between the parent->child are ALL inherited
by this process.

Other than waiting until the first child spins it off, I can't think of a simple
and portable solution.

Apache's really not the place to launch stand-alone, detached daemons, which is
what this developer appears to be doing.

Bill

Reply via email to