lgauthie has asked for the wisdom of the Perl Monks concerning the following question:
Until today, any call to this sub worked perfectly. But unfortunately, things have changed...# declare needed variables and connect to process local (*CHILD_IN, *CHILD_OUT, *CHILD_ERR); my ($childpid, @outlines, @errlines); $childpid = open3(*CHILD_IN, *CHILD_OUT, *CHILD_ERR, $cmd); # feed input to process, then close input print CHILD_IN $input; close (CHILD_IN); # save output and errors, close channels and process chomp(@outlines = <CHILD_OUT>); close (CHILD_OUT); chomp(@errlines = <CHILD_ERR>); close (CHILD_ERR); waitpid($childpid, 0); # return the result of the call return { OUTPUT => \@outlines , ERRORS => \@errlines };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IPC::Open3 & closed STDOUT
by ptkdb (Monk) on Nov 18, 2003 at 14:03 UTC | |
by Anonymous Monk on Nov 18, 2003 at 14:15 UTC | |
by ptkdb (Monk) on Nov 18, 2003 at 18:43 UTC | |
|
Re: IPC::Open3 & closed STDOUT
by etcshadow (Priest) on Nov 19, 2003 at 05:45 UTC | |
by tye (Sage) on Nov 19, 2003 at 15:51 UTC | |
|
Re: IPC::Open3 & closed STDOUT
by ysth (Canon) on Nov 18, 2003 at 14:45 UTC | |
|
Re: IPC::Open3 & closed STDOUT
by lgauthie (Novice) on Nov 27, 2003 at 13:42 UTC |