Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

Forking a process [in Practical mod_perl book]

Raymond Wan

2008-04-17

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi all,

I'm trying to fork a long-running process which I do not want to wait
for. I was getting a lot of "ssh <defunct>" processes, so I did some
googling and found this from the aforementioned O'reilly book:

http://www.perl.com/lpt/a/701

And sure enough, there's a section on "Avoiding Zombie Processes". In
this section's example code, the authors have added these two lines to
the top:

-----
my $r = shift;
$r->send_http_header('text/plain');
-----

which did not exist in the previous examples. I don't quite understand
why setting the HTTP header has any relevance to zombie processes.
Apologies if I missed it somewhere on this page, but could anyone shed
some light on why these two lines are important enough to remain in all
future examples on this topic?

Thank you!

Ray



©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.