Thanks, but I'm already able to do this easily with the aforementioned code, and BTW I'm using Tk, not win32::gui. I appreciate the reply though.
Maybe I should clarify some more. I'm able to remove the console DOS window with this above code, but when you do that it appears to wreak havoc with the IPC::Open2 function that wants to communicate to the child process on the child process's STDIN. I assume this is because removing the DOS console removes the connnection to both STDIN and STDOUT of the parent. What really confuses me though is that I'm not really trying to use STDOUT on the parent. I thought I was just using a filehandle and only the child process has to have STDIN.
Justin Eltoft
"If at all god's gaze upon us falls, its with a mischievous grin, look at him" -- Dave Matthews | [reply] |
| [reply] |
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") | [reply] [d/l] [select] |