0 to indicate no errors,
   and a small positive integer to indicate failure.
   All open output channels are flushed with <code class="code">flush_all</code>.
   An implicit <code class="code">exit 0</code> is performed each time a program
   terminates normally.  An implicit <code class="code">exit 2</code> is performed if the program
   terminates early because of an uncaught exception.<br>
</div>

<pre><span id="VALat_exit"><span class="keyword">val</span> at_exit</span> : <code class="type">(unit -&gt;