A
Andrew Zhilenko
Hello,
Apparently Perl caches the value of the $$ variable (PID). So if it is a
process with the embedded perl, and fork was performed not from within the
Perl code, but by the C code 'outside' - the value of the $$ variable
stays the same. I can see this topic already have been discussed, but
apparently ha not been fixed:
http://groups.google.com/groups?hl=...34857.210a254b.rgarciasuarez%40free.fr&rnum=6
Any suggestions? I can, of course, create an XS module which will call
C-function "getpid" and this module will called from my embedded perl code
- but this very inelegant way of solving the problem.
WBR, Andrew
Apparently Perl caches the value of the $$ variable (PID). So if it is a
process with the embedded perl, and fork was performed not from within the
Perl code, but by the C code 'outside' - the value of the $$ variable
stays the same. I can see this topic already have been discussed, but
apparently ha not been fixed:
http://groups.google.com/groups?hl=...34857.210a254b.rgarciasuarez%40free.fr&rnum=6
Any suggestions? I can, of course, create an XS module which will call
C-function "getpid" and this module will called from my embedded perl code
- but this very inelegant way of solving the problem.
WBR, Andrew