<br><br><div class="gmail_quote">On Sun, May 12, 2013 at 2:36 PM, David T. Lewis <span dir="ltr"><<a href="mailto:lewis@mail.msen.com" target="_blank">lewis@mail.msen.com</a>></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>
> On Sun, 12 May 2013, Frank Shearar wrote:<br>
><br>
> ><a href="http://build.squeak.org/job/ReleaseSqueakTrunk/239/console" target="_blank">http://build.squeak.org/job/ReleaseSqueakTrunk/239/console</a> shows the<br>
> >CommandLineToolSet correctly bailing a release because<br>
> >ReleaseBuilderFor4dot5 no longer exists. Note the build's green light.<br>
> >What I'd like is a means of quitting the image _with an error_.<br>
> ><br>
> >How do I do that?<br>
><br>
> CogVM has support for it - not sure about the interpreter, but there's<br>
> definitely no support code on the image-side. The way it works is that you<br>
> 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>>primitiveQuitWithStatus<br>
"Exit the VM immediately, returning an exit value"<br>
<export: true><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>>forceExitWithStatus: statusInteger<br>
"Smalltalk forceExitWithStatus: 7"<br>
<primitive: 'primitiveQuitWithStatus'><br>
self primitiveFailed<br>
<br>
Dave<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> quitPrimitive: exitCode<br>
> "Primitive. Exit to another operating system on the host machine, if<br>
> one<br>
> exists. All state changes in the object space since the last<br>
> snapshot are lost.<br>
> Essential. See Object documentation whatIsAPrimitive."<br>
><br>
> <primitive: 113><br>
> self primitiveFailed<br>
><br>
><br>
> Levente<br>
><br>
> ><br>
> >frank<br>
> ><br>
> ><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>