in reply to Re^2: Windows cmd.exe output -> Tk text widget?
in thread Windows cmd.exe output -> Tk text widget?

First of all, I don't use MSWindows, but from a casual glance, you are trying to use IPC::Open3 for your pipe, and I don't think it works correctly on windows. See Another Win32 Tk fileevent work around : using ioctl() properly and Please suggest a non-forking way to do this (OS: windows) for starters.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re^3: Windows cmd.exe output -> Tk text widget?

Replies are listed 'Best First'.
Re^4: Windows cmd.exe output -> Tk text widget?
by chessgui (Scribe) on Feb 10, 2012 at 13:12 UTC
    Look: this is not an issue. IPC::Open3 works fine on Windows. What does not work on Windows is a non-blocking read on file handles and any kind of solution which boils down to 'timeout' or 'can read' with respect to filehandles. The thing you have to do is to create threads to perform blocking reads on filehandles. If this is done in a Tk application you should avoid joining your threads before you quit the main loop unless you want to crash miserably. If you adhere to these precautions you can write a multi threaded process piping Tk application under Windows in a safe way. I have learned the lessons well because I have a quite complicated Tk application which monitors and sends command to heavy external processes. The issue here is with code pages however this I've already resolved in a separate node.