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; }
In reply to Access value of a variable after exit 0 in fork by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |