Vishal Mittal <[EMAIL PROTECTED]> wrote:
>
> I am encountering a problem with this piece of code
> that I have written for forking multiple processes and
> making all the child processed communicating with the
> parent process...
>
> **************************************************
>
> my($child_fh, $parent_fh) = (new IO::Handle, new IO::Handle);
...
> open(STDOUT, ">&$parent_fh") or die "Cant redirect STDOUT $!\n";
> open(STDIN, "<&$parent_fh") or die "Cant redirect STDIN $!\n";
Here you need to do:
open STDOUT, "<&" . $parent_fh->fileno
But you'd be *much* better off with IPC::Open{2,3}.
--
Steve
perldoc -qa.j | perl -lpe '($_)=m("(.*)")'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]