
Kanji
User
/ Moderator
Sep 18, 2000, 8:46 PM
Post #3 of 3
(1991 views)
|
Depends how you invoke the child. If you're using fork() it's nice and easy ... <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> if ( $cpid = fork ) { print "I'm the parent. My pid is $$, and my child is $cpid"; } else { print "I'm the child. My pid is $$, and my parent is ", getppid; }</pre><HR></BLOCKQUOTE>
|