X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Funhandled-exception-5.cs;h=65cff47d992292b5be579de808e5f74902d20926;hb=b3901be2f68591e87ca2a9e45961b691de2f12e8;hp=33136b33590b44acb8f884f480caa70f997efde2;hpb=e137ff6f7e2594d3ce96b4c74b528d26cc80e11d;p=mono.git diff --git a/mono/tests/unhandled-exception-5.cs b/mono/tests/unhandled-exception-5.cs index 33136b33590..65cff47d992 100644 --- a/mono/tests/unhandled-exception-5.cs +++ b/mono/tests/unhandled-exception-5.cs @@ -26,6 +26,9 @@ class Driver /* expected exit code: 255 */ static void Main (string[] args) { + if (Environment.GetEnvironmentVariable ("TEST_UNHANDLED_EXCEPTION_HANDLER") != null) + AppDomain.CurrentDomain.UnhandledException += (s, e) => {}; + new FinalizedClass(); GC.Collect (); @@ -34,6 +37,10 @@ class Driver if (!mre.WaitOne (5000)) Environment.Exit (2); + /* Give a chance to the finalizer thread to finish executing the exception unwinding + * after the finally, before we exit with status 0 on the current thread */ + Thread.Sleep (1000); + Environment.Exit (0); } }