![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re: Proper Forkingby decnartne (Beadle) |
on Jul 24, 2001 at 23:33 UTC ( [id://99458]=note: print w/replies, xml ) | Need Help?? |
in answer to your first question, one way to use fork() that has worked for me is the following:
unless( fork ) { exec "/some/cmd/here"; }i believe your script hangs since your getppid never returns a 1. instead, it is returning the pid of the forked child's parent - in this case A.pl - which will not be process id 1. process id 1 is probably your box's /etc/init process if it's unix and not even there if on win32... decnartne ~ entranced
In Section
Seekers of Perl Wisdom
|
|