<br><br><div class="gmail_quote">On Sun, May 12, 2013 at 2:36 PM, David T. Lewis <span dir="ltr">&lt;<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Sun, May 12, 2013 at 10:18:51PM +0200, Levente Uzonyi wrote:<br>
&gt; On Sun, 12 May 2013, Frank Shearar wrote:<br>
&gt;<br>
&gt; &gt;<a href="http://build.squeak.org/job/ReleaseSqueakTrunk/239/console" target="_blank">http://build.squeak.org/job/ReleaseSqueakTrunk/239/console</a> shows the<br>
&gt; &gt;CommandLineToolSet correctly bailing a release because<br>
&gt; &gt;ReleaseBuilderFor4dot5 no longer exists. Note the build&#39;s green light.<br>
&gt; &gt;What I&#39;d like is a means of quitting the image _with an error_.<br>
&gt; &gt;<br>
&gt; &gt;How do I do that?<br>
&gt;<br>
&gt; CogVM has support for it - not sure about the interpreter, but there&#39;s<br>
&gt; definitely no support code on the image-side. The way it works is that you<br>
&gt; can add an argument to primitive 113. E.g.:<br>
<br>
</div>This feature is not in the interpreter VM. It requires an update from the<br>
oscog platforms sources to the trunk platforms sources in Subversion, and<br>
that has not yet been done.<br>
<br>
FWIW, if you are compiling your own VM (Cog or interpreter) it is easy to<br>
add a primitive to do the same thing:<br>
<br>
InterpreterPrimitives&gt;&gt;primitiveQuitWithStatus<br>
        &quot;Exit the VM immediately, returning an exit value&quot;<br>
        &lt;export: true&gt;<br>
        self exit: (self stackIntegerValue: 0).<br>
        ^self primitiveFail<br></blockquote><div><br></div><div>Um, not in Cog.  In the Cog VM it must exit through ioExitWithErrorCode to avoid breaking various services.  In the Interpreeter VM I suspect ioExitWithErrorCode needs to be added also because using exit will circumvent the code in ioExit.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Then add this to the image:<br>
<br>
SmalltalkImage&gt;&gt;forceExitWithStatus: statusInteger<br>
        &quot;Smalltalk forceExitWithStatus: 7&quot;<br>
        &lt;primitive: &#39;primitiveQuitWithStatus&#39;&gt;<br>
        self primitiveFailed<br>
<br>
Dave<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt; quitPrimitive: exitCode<br>
&gt;       &quot;Primitive. Exit to another operating system on the host machine, if<br>
&gt;       one<br>
&gt;       exists. All state changes in the object space since the last<br>
&gt;       snapshot are lost.<br>
&gt;       Essential. See Object documentation whatIsAPrimitive.&quot;<br>
&gt;<br>
&gt;       &lt;primitive: 113&gt;<br>
&gt;       self primitiveFailed<br>
&gt;<br>
&gt;<br>
&gt; Levente<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt;frank<br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>