On Tue, Oct 4, 2016 at 3:38 PM, Holger Freyther holger@freyther.de wrote:
with printCallStack() I can see it is running and activeProcess gives me the process. What I can't find is how to suspend/terminate that process. E.g. for the primtiveSuspend (or TerminateTo) I will need to prepare the call-stack.
Is there a way I can terminate such a process from the debugger?
Interesting challenge. I tried to replicate but in Linux Pharo 50760 doing "[[] repeat] fork" doesn't even lock the UI. So just some random guesses without being able to test them...
Perhaps you don't need to kill it, just lower its priority so the UI process takes precedence. I see in VMMaker, StackInterpreter>>printProcessStack: calls "self quickFetchInteger: PriorityIndex ofObject: proc" (which seems inlined) which calls #integerValueOf: for which the opposite seems to be #integerObjectOf: .
So maybe try tracing into printProcessStack() and once you have the oop for the priority, maybe push integerObjectOf(10) into it.
Or maybe try use #stObject:at:put or #storeInteger:ofObject:withValue: directly.
Another option may be putToSleepyieldingIf()
cheers -ben