Changeset 13530


Ignore:
Timestamp:
08/22/11 09:52:28 (10 years ago)
Author:
Mark Evenson
Message:

All LispThread? objects can act on a ProcessingTerminated? exception.

Without this modifications, threads created with the
THREADS:MAKE-THREADS cannot successfully call the EXT:QUIT or EXT:EXIT
functions. This prevented the SLIME quit implementation from
successfully quitting implementations.

Note that all threads can always execute a form like

(jstatic "exit" "java.lang.System" 0)

to uncermoniously exit the JVM, so there is nothing gained
security-wise by preventing threads from using the official Lisp
interfaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/LispThread.java

    r13461 r13530  
    4242import java.util.concurrent.atomic.AtomicInteger;
    4343
     44import java.text.MessageFormat;
     45
    4446public final class LispThread extends LispObject
    4547{
     
    99101                      // Might happen.
    100102                }
     103                catch (ProcessingTerminated e) {
     104                    System.exit(e.getStatus());
     105                }
    101106                catch (Throwable t) { // any error: process thread interrupts
    102107                    if (isInterrupted()) {
    103108                        processThreadInterrupts();
    104109                    }
     110                    String msg
     111                        = MessageFormat.format("Ignoring uncaught exception {0}.",
     112                                               t.toString());
     113                    Debug.warn(msg);
    105114                }
    106115                finally {
Note: See TracChangeset for help on using the changeset viewer.