in reply to Issue with communication of large data between Parent and child using Perl pipes
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Issue with communication of large data between Parent and child using Perl pipes
by ikegami (Patriarch) on Jul 17, 2009 at 21:39 UTC | |
by ig (Vicar) on Jul 17, 2009 at 21:52 UTC | |
by Marshall (Canon) on Jul 17, 2009 at 22:04 UTC |