If I use SetChildShowWindow(SW_HIDE) wperl.exe won't open the console window for the piped process but the app itself crashes anyway (in fact NO code following the Open2 seems to be processed - it simply freezes at that point). Your second solution won't work since $cflags (creation flags, like CREATE_NO_WINDOW) can only be passed to a Win32::Process object if the process is created by Win32::Process::Create. If you create a process from a pid through Win32::Process::Open $cflags can not be passed (therefore you can't shut down a window created by Open2 or the window of the script itself).

Let's put it simply: wperl.exe crashes with an Open2 call under Win32, perl.exe on the other hand always opens a console window whether there are child processes or not.

In reply to Re^2: Wperl.exe fails with Tk + piped process ( Win32 ) by chessgui
in thread Wperl.exe fails with Tk + piped process ( Win32 ) by chessgui

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.