Squeak in Emergency mode

Ned Konz ned at squeakland.org
Wed Dec 15 21:55:22 UTC 2004


On Tuesday 14 December 2004 3:22 am, Jan B. Krejčí wrote:

> I've got few stupid questions. I would like to create a .st script,
> which, given to Squeak as a command line parameter, 

Remember that you have to give it as a file:// URL with an absolute path (or 
as an http:// or ftp:// URL, but file:// is easiest):

file:///my/squeak/directory/someScript.st

> will revitalize my 
> image which is accidentaly messed up with number of CPU consuming
> threads running, preventing me to interact with Squeak furthermore.
>
> 1) how do I determine what threads are vital for running squeak?

ProcessBrowser nameAndRulesFor: aProcess

will return a 3-element Array with:
(1) a descriptive name
(2) a Boolean which is true if you can safely stop or kill aProcess
(3) a Boolean which is true if you can safely debug aProcess

> 2) how do I kill ALL the threads running (except the one executing my
> command line script, of course)?

There are some threads you don't want to kill. Trust me on this. And in any 
event, these are not the ones that are likely to be causing you problems. Try 
this first:

"to kill all the non-essential processes:"

Process allInstancesDo: [ :p | | rules |
 rules := ProcessBrowser nameAndRulesFor: p.
 rules second ifTrue: [ p terminate ]].

SoundPlayer playerProcess ifNotNilDo: [ :p | p terminate ].

> 3) how and in what order do I start the needed ones again?
>

The above shouldn't require restarting anything special.

-- 
Ned Konz
http://bike-nomad.com/squeak/



More information about the Squeak-dev mailing list