"That's not too unheard off, the second window is similar to a GUI app which writes errors into the original console."

This isn't exactly as easy as it sounds, especially given the difficulty of transferring environment from one console to another. In berrybrew, doing what you suggest means having one app (ie. GUI) communicating with a backend that also communicates to another app (CMD window) to display any output. That 'kind of' happens in debug mode, but only artificially.

The GUI is typically started from the CMD, so in this case it is the backend that communicates to the other window, but one way or another, you have to start another shell if you want to trap it there. It's unfortunately not as easy as a tee

If this problem could ever be solved especially if the environment could be carried from one CMD to another, I could remove a couple hundred lines of C# and make great efficiencies :)

I have literally been waiting for a solution to this specific question for a long time. I just didn't know how to ask it.


In reply to Re: WIN redirecting STDOUT and STDIN to new spawned CMD console by stevieb
in thread WIN redirecting STDOUT and STDIN to new spawned CMD console by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.