It would return original parent's id that forked the child and pid of current parent. Any idea how to work around this problem ?use strict; my $pid = $$; print "My PID is $pid\n"; fork and exit; sleep 1 while -e "/proc/$pid/cwd"; print "My PPID is ", getppid, " after my parent is killed\n";
In reply to getppid() returns cached value by pratik
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |