Thank you.
Yes I am forking more process from a CGI script because I want to let them
run on the server then end loading the current page immediately.

Can you give me a short example about how I should create that loop?

Thank you.

----- Original Message ----- 
From: "Wiggins d Anconia" <[EMAIL PROTECTED]>
To: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, December 08, 2003 6:58 AM
Subject: Re: Fork


>
>
> > Hi all,
> >
> > Please tell me how could I fork more child processes.
> > I want to fork let's say 10 child processes.
> >
> > I know that I can do something like the following, but I am wondering if
> > there is a clearer method:
> >
> > if (my $pid = fork) {
> > #parent
> >
> > if(my $pid2 = fork) {
> > #parent 2
> >
> > if (my $pid3 = fork) {
> > #parent3
> > }
> > elsif(defined $pid3) {
> > #child3
> > }
> > }
> > elsif(defined $pid2) {
> > #child2
> > }
> > }
> > elsif(defined $pid) {
> > #child1
> > }
> >
> > But this method is very confusing if I want to fork more child
processes,
> > and I want to let the user choose how many processes wants.
> >
> > Thank you.
> >
>
> How about a loop?  Storing the PIDs to an array/hash?  Are you really
> forking processes from a CGI script?
>
> http://danconia.org
>
> --
> Boycott the Sugar Bowl! You couldn't pay me to watch that game.
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to