Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

wwwxxix Buzz, wwwxxxdbgf, ncurses font size, WWWXXX USABLE, WwwXXX MPEG4, WWWXXX BABBAGE WWWXXX, IIS_asps05kj, WWWXXXDOCO, WWW.XXX,GCDMO, Idl Wwwxxx

Links

XODOX
Impressum

#1: Forking a process [in Practical mod_perl book]

Posted on 2008-04-17 18:29:27 by Raymond Wan

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

Report this message

#2: Re: Forking a process [in Practical mod_perl book]

Posted on 2008-04-17 19:50:02 by Raymond Wan

Hi all,

Raymond Wan wrote:
> -----
> my $r = shift;
> $r->send_http_header('text/plain');
> -----


Sorry for the trouble but while googling for the problem, I came by the
reason: "send the output of system() to the client":
http://www.mail-archive.com/modperl@apache.org/msg36062.html

I also realized that the solution for modperl1 differs for modperl2 and
the above snippet seems relevant to MP1...

Thanks!

Ray

Report this message