in reply to system() Creating Different Results than Commandline Operation.
One problem, maybe unrelated to your symptoms but a problem anyway, is that '/dev/null' doesn't exist on windows.
A simple system( "gcov c:/path/to/file.gcda -o relative/path/to/source -b 2>&1 >nul" ); would achieve your goal without all the faffing around.
If you're wedded to rolling your own redirection, then what do you get if you try:
$gcov_error = system_no_output( 1, 'perl.exe', '-le"print qq[>$_<] for @ARGV"' $da_filename, "-o", $object_dir, "-b" );
The idea being to isolate whether it is the arguments being passed to the executable that are being screwed with, or the command itself that is misinterpreting them.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: system() Creating Different Results than Commandline Operation.
by kazeits (Initiate) on Apr 06, 2009 at 18:14 UTC | |
by BrowserUk (Patriarch) on Apr 06, 2009 at 19:06 UTC |