Well, backtick and system don't return until the child process has finished, so its PID would be of no use. exec replaces your process with the child process, so again you won't be able to use the PID as your program will no longer be running.
fork returns the PID of the child to the parent and 0 to the child so that you can tell the difference between the two processes.
--"The first rule of Perl club is you don't talk about Perl club."
In reply to Re: getting a child's process ID
by davorg
in thread getting a child's process ID
by Seshouan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |