newbie question - killing a process
Ned Konz
ned at bike-nomad.com
Sat Jun 30 19:48:51 UTC 2001
On Saturday 30 June 2001 12:35, Rosemary Michelle Simpson wrote:
> How do you kill a process whose objects have gone away? I created a
> clock process (part of Mark's examples) and then made the mistake of
> quitting without terminating the process. Now I have an orphan clock that
> wont go away. I did as he suggested and did:
>
> Smalltalk garbageCollect.
> Process allInstances inspect.
>
> This produced a long array of 34 processes, most of which say "a Process
> in UndefinedObject>>DoIt". Mark says to 'find the one you want (probably
> near the bottom of the list) and send it terminate."
>
> My question is:
>
> How do I select a receiver from this array to terminate?
Easiest way is to use the Process Browser (World menu/debug/open Process
Browser). If they're still around, something's hanging on to them. Are
you assigning the Process to a variable (you must be or it would be GC'd when
it stopped)? You need to find (and delete) whatever's hanging on to the
variables that are hanging on to the Processes.
Just select one of your defunct processes in the Process Browser, kill it
(using the context menu), then see if it goes away. If not, pop up the
context menu again, and choose "chase pointers". You'll see what's hanging on
to that Process. Then just nil out the variable, re-collect garbage, and it
should be gone.
I added that when I made the Process Browser because this was a common
problem for me.
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|