What you have here doesn't appear to be a client-server application. For example: $pid=open(PARENT_READ_HANDLE, "-|"); "open()" does NOT return a PID, it returns status code from the open. The open function does not create a PID. For something like this:
open creates a filehandle status return code! PROG is a filehandle that captures the output of "some_program". You can do: while(<PROG>){...blah...}. This is a synchronous open and is a way of allowing the main program to capture the output of "some_program". Both programs really aren't "running at the same time".open (PROG, "some_program its_args |") or die "can not run some_program $!";
I looked for that the "-" modifier does in front of pipe symbol, eg "-|" instead of just "|" and didn't figure that out. I doubt that the answer changes the above, but would be curious as to what that "-" means...thanks to anybody who can clue me in!
In reply to Re: Issue with communication of large data between Parent and child using Perl pipes
by Marshall
in thread Issue with communication of large data between Parent and child using Perl pipes
by waavman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |