in reply to Proper Forking

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