perlprocessglobal-variablessystemscribe

Parent process variables inside Child process in Perl


As I know system is a OS call and child.pl will be completly different process but still Is there a way I can access $logger ie AppLogger object inside child.pl without re-creating an connection object each time I want to log.


Solution

  • No. system is a wrapper around fork+exec+wait. exec replaces the program executing in the process, including its heap (memory).