octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ctrl-C & error handling


From: John W. Eaton
Subject: Ctrl-C & error handling
Date: Sun, 29 Mar 2009 09:39:23 -0400

On 29-Mar-2009, Jaroslav Hajek wrote:

| is there any possibility for an m-function to implement a custom
| cleanup when Ctrl-C is detected? unwind_protect does not seem to catch
| Ctrl-C.
| The problem is that if a function manipulates system resources in a
| non-trivial manner, like parcellfun from the general package, it is
| not easy to manually clean up (parcellfun interrupted by Ctrl-C leaves
| hanging processes in the memory).

The unwind-protect mechanism is intended to handle interrupts, so I
think it is a bug if somehow Ctrl-C jumps back to the top level
without evaluating the cleanup blocks.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]