# Fork the process as its own parent. I am assuming by # recieving a parent of 1 that the Child is not just a copy # of the parent. unless (fork) { # Create first child unless (fork) { # Create Second Child sleep 1 until getppid == 1; # Execute our command exec "distill mypsfile.ps"; exit 0; } exit 0; } # Wait for the first child to be reaped # How can we make this wait until the exec statement # has completed before exiting ????????? wait;