runProgram action pipes output to program_stdout that results very bad performance for large outputs

Comments

1 comment

  • Avatar
    wojciechka

    It is not possible to disable reading of stdout and stderr from a child process.

    The best solution for these cases is to create a .bat script and shell script on Unix systems file that does redirect to /dev/null or NUL and run that bat/shell file inside <runProgram>. For example:

    <if> <actionList> <writeFile> <path>${system_temp_directory}/7z_temp.bat</path> <text>cd /D "${installdir.dos}" 7z\7z.exe x tmp.7z &gt;NUL 2&gt;NUL </text> </writeFile> <runProgram> <program>${system_temp_directory}/7z_temp.bat</program> <programArguments></programArguments> </runProgram> <deleteFile> <path>${system_temp_directory}/7z_temp.bat</path> </deleteFile> </actionList> <conditionRuleList> <platformTest> <type>windows</type> </platformTest> </conditionRuleList> <elseActionList> <writeFile> <path>${system_temp_directory}/7z_temp.sh</path> <text>cd "${installdir}" 7z/7z x tmp.7z &gt;/dev/null 2&gt;/dev/null </text> </writeFile> <runProgram> <program>sh</program> <programArguments>${system_temp_directory}/7z_temp.sh</programArguments> </runProgram> <deleteFile> <path>${system_temp_directory}/7z_temp.sh</path> </deleteFile> </elseActionList> </if>

Please sign in to leave a comment.