Canceling a runaway process

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Canceling a runaway process

P.S. Neeley
I'm fooling around with recursion and inevitably I shoot myself in the foot
on occasion.  Is it possible to 'break' a process with some combination of
keys rather than having to do Ctl-Alt-Del and restart Dolphin?

Thanks,

Steve


Reply | Threaded
Open this post in threaded view
|

Re: Canceling a runaway process

Chris Uppal-3
> Is it possible to 'break' a process with some combination of
> keys rather than having to do Ctl-Alt-Del and restart Dolphin?

CTRL+BREAK will normally do it.  Sometimes you have to wait a couple of
seconds for any effect, though.

About once a year I find a situation where even CTRL+BREAK won't interrupt
the VM.  Not a major problem.

> Steve

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Canceling a runaway process

Ian Bartholomew
In reply to this post by P.S. Neeley
Steve,

> I'm fooling around with recursion and inevitably I shoot myself in the
> foot on occasion.  Is it possible to 'break' a process with some
> combination of keys rather than having to do Ctl-Alt-Del and restart
> Dolphin?

Yes, but with reservations.

Control-Break will usually stop a running process and bring up a walkback.

Reservation 1.
Dolphin only checks for interrupts at certain times (for performance reasons
if nothing else). If you get into a really tight loop, either in your code
or an expression you evaluate, then the break may not occur immediately. Try

100 timesRepeat: [10000 factorial]

start it running and hit Ctrl-Break. The process will break but, depending
on your timing, it may take a few seconds while the running factorial
calculation (which mainly uses primitives with no breakable operations)
finishes.

Reservation 2.
Dolphin often uses Windows services to perform certain types of operation.
While Windows has control Dolphin (usually) is unable to recognise any
interrupt requests.

There are ways of reducing the effect of 1 and getting around 2 (usually)
but they are not worth worrying about until it becomes a problem.

Regards
    Ian