IPC::Open2 always has the child's STDERR go to the parent's STDERR. This may cause problems if the parent no longer has a STDERR.
I'd try using IPC::Open3 and be sure to specify alternates for all three. Note that having the child's STDOUT and STDERR go to separate pipes can lead to deadlock so either send them both to the same pipe or send one or both of them to a file or even:
open(NUL,">nul") or die "nul: $!";
open3( ...., \*NUL, ... )
[ BTW, I think IPC::Open3 should be patched to handle
open3( "<nul", ">out.txt", ">err.txt", ... )
(: ]
-
tye
(but my friends call me "Tye")
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.