On 2011-06-05 10:42, Honza Mach wrote:
I am currently working on a project and I need parent process to fork
multiple children to do the actual work, but maintain a bidirectional
communication with each of the children to send them commands and
receive back, aggregate and display summary results
Thank you for your help.
Regards
Honza Mach
On Sun, 2011-06-05 at 13:09 -0400, Uri Guttman wrote:
> > "HM" == Honza Mach writes:
>
> HM> my ($child, $parent);
>
> HM> foreach my $i (1..3)
> HM> {
> HM> socketpair($child, $parent, AF_UNIX, SOCK_STREAM, PF_UNSPEC)
> HM>
> "HM" == Honza Mach writes:
HM> my ($child, $parent);
HM> foreach my $i (1..3)
HM> {
HM> socketpair($child, $parent, AF_UNIX, SOCK_STREAM, PF_UNSPEC)
HM> or die "socketpair: $!";
you are using the same variables to store each socketpair in the
loop. so that will close