[Issue 3462] Add a clean way to exit a process.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 31 23:15:07 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3462


Sean Kelly <sean at invisibleduck.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED


--- Comment #3 from Sean Kelly <sean at invisibleduck.org> 2009-10-31 23:15:05 PDT ---
This is tricky.  If multiple threads are running then the app has to either
forcibly terminate the threads or wait for them to complete.  Even trickier if
the ProcessExit exception isn't thrown from the main thread.  One could send a
signal to all executing threads, telling them to throw an exception except that
it isn't legal to throw an exception from a signal handler.

Sadly, I haven't come up with a way to do this that doesn't risk deadlocks or
other Bad Things from happening.  As far as I know, the easiest thing is still
to call cstdlib exit().  If a clean, safe option presents itself I'd gladly add
a Runtime.exit() routine.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list