Originally Posted by zechasso
...with the function get.pgrp(pid) I get the PID from my own PCF-process...
No. You get the identification number of the process group. That can be identical to the process id, but don't rely on that! See set.pgrp() for details, or have look at Option Dialog / Start shell / ps / columns 1 and 2.
I think you can use the predefined variable 'parent'.