perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Förtsch <torsten.foert...@gmx.net>
Subject Re: Apache2::SubProcess subprocess not subprocessing properly
Date Wed, 10 Feb 2010 14:07:27 GMT
On Tuesday 09 February 2010 14:21:57 Tosh Cooey wrote:
> use POSIX 'setsid';
if( fork ) { POSIX::_exit 0; CORE::exit 0 }
> chdir '/'                or die "Can't chdir to /: $!";
> 
simplest is to fork() another time to break the parent-child relationship.

Keep in mind that you make your service vulnerable if you simply fork off long 
running processes.

What prevents a user from testing it:

  ab -n 100000 -c 100 http://...

This will quite fast create a *lot* of processes.

I tend to use some kind of queue for such processing. But, of course, it 
depends.

Torsten

Mime
View raw message