From: monojenkins Date: Wed, 15 Jun 2016 15:18:42 +0000 (+0100) Subject: Merge pull request #3169 from lambdageek/fix-regression-70561 X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=bc6f673c13a609f0b7de3d894c07683a0e5a1661;hp=d2cc9be75b10cd5d96a85dde6aff2ed014c1a6f7;p=mono.git Merge pull request #3169 from lambdageek/fix-regression-70561 [coop] Fix regression in bug-70561.cs Match behavior of non-coop and don't set an exit code if the main method throws an unhandled exception. --- diff --git a/mono/metadata/object.c b/mono/metadata/object.c index 6d67358ec07..73798605225 100644 --- a/mono/metadata/object.c +++ b/mono/metadata/object.c @@ -4775,13 +4775,7 @@ do_exec_main_checked (MonoMethod *method, MonoArray *args, MonoError *error) if (is_ok (error)) rval = 0; else { - /* If the return type of Main is void, only - * set the exitcode if an exception was thrown - * (we don't want to blow away an - * explicitly-set exit code) - */ rval = -1; - mono_environment_exitcode_set (rval); } } return rval;