From 1fdd17e611042208126819f5f73f56bbcfb083b3 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 3 Oct 2016 20:02:28 +0200 Subject: [PATCH] [mtouch] Add (another) workaround for file descriptor leak in System.Diagnostics.Process. (#934) --- tools/common/Driver.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/common/Driver.cs b/tools/common/Driver.cs index ec9dbf27d6e6..45c6df39718d 100644 --- a/tools/common/Driver.cs +++ b/tools/common/Driver.cs @@ -172,6 +172,8 @@ public static int RunCommand (string path, string args, string[] env = null, Str stderr_completed.WaitOne (TimeSpan.FromSeconds (1)); stdout_completed.WaitOne (TimeSpan.FromSeconds (1)); + GC.Collect (); // Workaround for: https://bugzilla.xamarin.com/show_bug.cgi?id=43462#c14 + if (p.ExitCode != 0) { // note: this repeat the failing command line. However we can't avoid this since we're often // running commands in parallel (so the last one printed might not be the one failing)