apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: no replacement for ap_spawn_child's functionality?
Date Fri, 23 Nov 2001 18:50:45 GMT
On Friday 23 November 2001 10:06 am, Stas Bekman wrote:
> Ryan Bloom wrote:
> > On Friday 23 November 2001 12:25 am, Stas Bekman wrote:
> >>I'm porting Apache::SubProcess Perl/XS module to mod_perl 2.0 and after
> >>checking the existing APR's API I have found that the functionality
> >>existing in ap_spawn_child from 1.3.x has gone. Now you can only run a
> >>program/script from the spawned process.
> >>
> >>Any reason for removing this support? I'm probably not aware of some
> >>hidden portablity issues, but by comparing ap_spawn_child from 1.3.x
> >>with apr_proc_create() from APR isn't the change is as simple as
> >>replacing execve() call with func() call after copying apr_proc_create()
> >>into some different function (of course the args should be different)?
> >
> > Windows doesn't support creating a new process without running a new
> > program.  I have been looking at creating fork() on Windows, but it is
> > incredibly non-trivial.
>
> so how is this solved in 1.3.x? Or is it not used for portable modules?
> I see (grep) that at least mod_rewrite and http_log use it in core.

Take a look at the implementation of spawn_child_core on Windows though.
It isn't actually creating a new process.  Near as I can tell, it is doing all of
the work in a thread from the original process.  I can't find where the thread
is created, but we also don't have any function to create a new process.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Mime
View raw message