Make sure both stdout and stderr can be redirected from a native executable (#20997)

This commit is contained in:
Patrick Meinecke
2024-03-14 11:42:30 -07:00
committed by GitHub
parent d67a82d833
commit 4faf52726d
3 changed files with 44 additions and 30 deletions
+5
View File
@@ -8,6 +8,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.IO;
using System.Globalization;
using System.Linq;
namespace TestExe
{
@@ -36,6 +37,10 @@ namespace TestExe
case "-stderr":
Console.Error.WriteLine(args[1]);
break;
case "-stderrandout":
Console.WriteLine(args[1]);
Console.Error.WriteLine(new string(args[1].ToCharArray().Reverse().ToArray()));
break;
case "-readbytes":
ReadBytes();
break;