How to exit a process?

Steven Schveighoffer schveiguy at yahoo.com
Mon Dec 6 11:39:01 PST 2010


On Mon, 06 Dec 2010 14:11:59 -0500, Adam Ruppe <destructionator at gmail.com>  
wrote:

> Is there a thing like C's exit() for a D program? Is
> simply using C's function good enough?

Yes, it will work.

Note that it does not gracefully shut down a process.  Anything outside  
the process that is left in an intermediate state will not be cleaned up.

For instance, if you created a lock file, it will remain.

But in general, it's safe to use, the OS will clean up the memory and open  
handles, etc.

-Steve


More information about the Digitalmars-d-learn mailing list