if(defined($child_pid)){
You probably meant if($child_pid){, as testing defined $child_pid is true for both parent and child (pid==0), so they'll both execute the same code — which is most likely not what you want...
In reply to Re: Bidirectional Communication using sockets and forking
by almut
in thread Bidirectional Communication using sockets and forking
by biohisham
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |