Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am not sure if I am describing it correctly but will paste a chunk of my code to explain properly, where I am getting stuck.
$trigger='OFF'; my $pid = fork(); if ($pid == 0) { #some process invoked on xterm if (process invoked on xterm gives a signal){ $trigger='ON'; } exit 0; } my $pid = fork(); if ($pid == 0) { #some other process on xterm if( $trigger eq 'ON') { #------->This has value OFF as declared g +lobally. I want this to have value from previous process. What do I d +o? #do something exit 0; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Access value of a variable after exit 0 in fork
by NetWallah (Canon) on Dec 27, 2012 at 07:33 UTC | |
by Anonymous Monk on Dec 27, 2012 at 08:53 UTC | |
by Anonymous Monk on Dec 27, 2012 at 10:52 UTC |