[squeak-dev] Squeak won't always quit

Louis LaBrunda Lou at Keystone-Software.com
Thu Oct 19 12:01:25 UTC 2017


Hi Dave,

Thanks for the reply.

>Hi Lou,

>I think there is some clever shutdown code in #snapshot:andQuitWithExitCode:.
>Maybe you care about that, and maybe you don't. And maybe it works reliably
>and maybe it does not, I don't know.

I'm thinking I don't care about it.

>But I do know that if you do "Smalltalk quitPrimitive: 7" it will definitely
>exit, and the $? exit code that you see in the shell will be 7. So that may
>be all that you need to do.

I'm sure I knew this but you pointing it out got me to realize that any time my Squeak program
exits it will only be restarted with a reboot of the Raspberry.  Given that and that I don't
save the image, rebooting should clean up everything to a fresh start, including the GPIO pins.
So, I will avoid all the Squeak shutdown code and just exit with the primitive.

>Note: The clever shutdown code is probably there to try to do a reasonable
>cleanup for a Squeak image that might have open connections to a database session,
>or some other resource then should be properly cleaned up before you kill the
>Squeak VM process. Given that you a using a Raspberry Pi and that you want to
>be able kill it reliably, you are probably not worried about database sessions
>and that sort of thing. So just kill it and check exit status, and you should
>be good to go.

Agreed.

>Dave

Thanks again, Dave.

Lou

-- 
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon



More information about the Squeak-dev mailing list