shura has asked for the wisdom of the Perl Monks concerning the following question:
The problem is that Win32::Process::Create don't see the local redirected STDOUT , but only the global one. Does anyone knows how can I do in this case local redirection of STDOUT , in such way that in main program STDOUT will stay untouched and only my created process will inherit this local redirected handle. Thankssub my_function { local *STDOUT; open STDOUT , "> my_file"; my $proc; Win32::Process::Create($proc , 'c:\windows\system32\cmd.exe' , '/c dir +' , 1 , 0, "."); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::Process handle inheritance
by ysth (Canon) on May 13, 2008 at 08:20 UTC | |
by tye (Sage) on May 13, 2008 at 12:42 UTC | |
by BrowserUk (Patriarch) on May 13, 2008 at 13:50 UTC | |
by tye (Sage) on May 13, 2008 at 14:29 UTC | |
by Anonymous Monk on May 13, 2008 at 11:16 UTC | |
|
Re: Win32::Process handle inheritance
by Anonymous Monk on Jun 12, 2008 at 00:53 UTC | |
|
Re: Win32::Process handle inheritance
by Anonymous Monk on Apr 26, 2013 at 10:39 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |