Browse Source

修复一个Linux下Watcher启动子进程一段时间后进程锁死的问题 (#541)

tanghai 2 years ago
parent
commit
4c22632e1f
1 changed files with 3 additions and 9 deletions
  1. 3 9
      Unity/Assets/Scripts/Core/Helper/ProcessHelper.cs

+ 3 - 9
Unity/Assets/Scripts/Core/Helper/ProcessHelper.cs

@@ -13,15 +13,9 @@ namespace ET
             //Log.Debug($"Process Run exe:{exe} ,arguments:{arguments} ,workingDirectory:{workingDirectory}");
             try
             {
-                bool redirectStandardOutput = true;
-                bool redirectStandardError = true;
-                bool useShellExecute = false;
-                if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
-                {
-                    redirectStandardOutput = false;
-                    redirectStandardError = false;
-                    useShellExecute = true;
-                }
+                bool redirectStandardOutput = false;
+                bool redirectStandardError = false;
+                bool useShellExecute = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
                 
                 if (waitExit)
                 {