Its about sharing a Perl Variable among parent and child processes.
Do you know of any design pattern or technique by which this can be achieved?
What I want is this...
$shared_var = 10;
if ($pid = fork) {
sleep 10;
print "$shared_var\n"; # Should show the child's changes...
} elsif (defined $pid) {
$shared_var = 12;
exit 0;
}
I want the change in the shared variable to be reflected to the parent process immediately...basically, same variable in memory should be changed.
Thanks,
Arijit
Start your day with Yahoo! - make it your home page
_______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs