Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Understanding fork

by neilwatson (Priest)
on Nov 08, 2002 at 17:38 UTC ( [id://211484]=note: print w/replies, xml ) Need Help??


in reply to Re: Understanding fork
in thread Understanding fork

In the parent process, fork() returns the process ID of the new child. So in that process, you redirect the user, and exit. (At least, I THINK you should exit, but you're falling out of that else clause in your sample, and doing the while twice...).

How do you prevent that?

Neil Watson
watson-wilson.ca

Replies are listed 'Best First'.
Re: Re: Re: Understanding fork
by RMGir (Prior) on Nov 08, 2002 at 18:21 UTC
    Where you have the comment about redirecting the user, add
    $SIG{CHLD}='IGNORE'; exit;
    That way, the parent process will exit immediately, hopefully without waiting for the child process.
    --
    Mike

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://211484]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 18:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found