The (ugly) manual exit logic was only needed when interacting with the
simulator, which mtouch doesn't do anymore.
This commit is contained in:
Rolf Bjarne Kvinge 2016-12-22 17:39:10 +01:00 коммит произвёл GitHub
Родитель 06b15ee45d
Коммит 7dad48a59c
1 изменённых файлов: 0 добавлений и 37 удалений

Просмотреть файл

@ -807,22 +807,6 @@ namespace Xamarin.Bundler
return true;
}
static List<string> mdbs = new List<string> ();
public static void DeleteDebugInfos ()
{
foreach (var mdb in mdbs) {
if (File.Exists (mdb)) {
try {
File.Delete (mdb);
} catch {
// Ignore any exceptions
}
}
}
}
public static string Quote (string f)
{
if (f.IndexOf (' ') == -1 && f.IndexOf ('\'') == -1 && f.IndexOf (',') == -1)
@ -1021,7 +1005,6 @@ namespace Xamarin.Bundler
return Main2 (args);
}
catch (Exception e) {
ErrorHelper.ExitCallback = (int exitCode) => Exit (exitCode);
ErrorHelper.Show (e);
}
finally {
@ -1053,26 +1036,6 @@ namespace Xamarin.Bundler
}
}
[DllImport ("/usr/lib/libSystem.dylib")]
static extern void exit (int exitcode);
public static void Exit (int exitCode = 0)
{
// This is ugly. *Very* ugly. The problem is that:
//
// * The Apple API we use will create background threads to process messages.
// * Those messages are delivered to managed code, which means the mono runtime
// starts tracking those threads.
// * The mono runtime will not terminate those threads (in fact the mono runtime
// will do nothing at all to those threads, since they're not running managed
// code) upon shutdown. But the mono runtime will wait for those threads to
// exit before exiting the process. This means mtouch will never exit.
//
// So just go the nuclear route.
exit (exitCode);
}
static int Main2 (string [] args)
{
var assemblies = new List<string> ();