Hello,

It disassociates the process from the controlling
terminal, or the login shell. Second, it removes the
process from the process group that initiated the
program. This ensures that the process is not a
process group leader, which is required for setsid()
to run successfully.

Regards
Nishanth

--- "Dr.Ruud" <[EMAIL PROTECTED]> wrote:

> nishanth ev schreef:
> > Dr.Ruud:
> >> nishanth ev:
> 
> 
> Please don't top-post. Please cut the text that you
> don't react upon,
> especially sigs and tails.
> 
> >>> defined(my $pid = fork);
> >> 
> >> What does that line do? It tests $pid for
> defined,
> >> but the return value is not used.
> >> "or die $!" missing?
> >
> > In case you want the die messages also...
> > [...]
> > defined(my $pid = fork)   or die "Can't fork: $!";
> > 
> > setsid                    or die "Can't start a
> new
> > session: $!";
> > 
> > Enjoy...!!!
> 
> I still don't understand what the line 
> 
> >>> defined(my $pid = fork);
> 
> is supposed to do. What does it do better than just 
> 
>    my $pid = fork;
> 
> -- 
> Affijn, Ruud
> 
> "Gewoon is een tijger."
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> <http://learn.perl.org/>
> <http://learn.perl.org/first-response>
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
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