From 88c9061f3e2a3d3d8d2f0003aaa6dbabac40b20f Mon Sep 17 00:00:00 2001 From: Gabor Melis Date: Thu, 13 Oct 2005 07:41:19 +0000 Subject: [PATCH] 0.9.5.54: * exit properly on SIGTERM and coredump on SIGQUIT (according to the glibc docs) --- NEWS | 2 ++ src/code/target-signal.lisp | 7 ++++--- version.lisp-expr | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 0e1e389..ae3e30c 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ changes in sbcl-0.9.6 relative to sbcl-0.9.5: (thanks to Kevin Reid) * new feature: the alignment of alien structure fields can be explicitly specified. (thanks to Cyrus Harmon) + * bug fix: run cleanup forms (in all threads) when receiving a SIGTERM + and dump core on SIGQUIT * threads ** bug fix: threads stacks belonging to dead threads are freed by the next exiting thread, no need to gc to collect thread stacks anymore diff --git a/src/code/target-signal.lisp b/src/code/target-signal.lisp index 09d8653..524233b 100644 --- a/src/code/target-signal.lisp +++ b/src/code/target-signal.lisp @@ -133,15 +133,16 @@ (declare (type system-area-pointer context)) (sb!impl::run-expired-timers)) -(defun sigquit-handler (signal code context) +(defun sigterm-handler (signal code context) (declare (ignore signal code context)) - (throw 'toplevel-catcher nil)) + (sb!thread::terminate-session) + (sb!ext:quit)) (defun sb!kernel:signal-cold-init-or-reinit () #!+sb-doc "Enable all the default signals that Lisp knows how to deal with." (enable-interrupt sigint #'sigint-handler) - (enable-interrupt sigquit #'sigquit-handler) + (enable-interrupt sigterm #'sigterm-handler) (enable-interrupt sigill #'sigill-handler) (enable-interrupt sigtrap #'sigtrap-handler) (enable-interrupt sigiot #'sigiot-handler) diff --git a/version.lisp-expr b/version.lisp-expr index e2bd1b9..0ef37b1 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.9.5.53" +"0.9.5.54" -- 1.7.10.4