mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Call init-hooks before starting finalizer
See https://groups.google.com/g/sbcl-devel/c/U98XUqdI5lY/m/-sQ7VQcmBAAJ
This commit is contained in:
parent
00e576f2f9
commit
3558c49426
|
|
@ -341,8 +341,8 @@ process to continue normally."
|
|||
;; re-disable ldb again.
|
||||
(when (eq *invoke-debugger-hook* 'sb-debug::debugger-disabled-hook)
|
||||
(sb-debug::disable-debugger))
|
||||
#+sb-thread (finalizer-thread-start)
|
||||
(call-hooks "initialization" *init-hooks*))
|
||||
(call-hooks "initialization" *init-hooks*)
|
||||
#+sb-thread (finalizer-thread-start))
|
||||
|
||||
;;;; some support for any hapless wretches who end up debugging cold
|
||||
;;;; init code
|
||||
|
|
|
|||
33
tests/init-hooks.test.sh
Normal file
33
tests/init-hooks.test.sh
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This software is part of the SBCL system. See the README file for
|
||||
# more information.
|
||||
#
|
||||
# While most of SBCL is derived from the CMU CL system, the test
|
||||
# files (like this one) were written from scratch after the fork
|
||||
# from CMU CL.
|
||||
#
|
||||
# This software is in the public domain and is provided with
|
||||
# absolutely no warranty. See the COPYING and CREDITS files for
|
||||
# more information.
|
||||
|
||||
. ./subr.sh
|
||||
|
||||
use_test_subdirectory
|
||||
|
||||
tmpcore="init-hook-test.core"
|
||||
|
||||
run_sbcl <<EOF
|
||||
(push 'check-no-threads sb-ext:*init-hooks*)
|
||||
(defun check-no-threads ()
|
||||
(sb-sys:os-exit (if (sb-thread::thread-p sb-impl::*finalizer-thread*) 1 0)))
|
||||
(save-lisp-and-die "$tmpcore")
|
||||
EOF
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "failure saving core"
|
||||
exit 1
|
||||
fi
|
||||
run_sbcl_with_core "$tmpcore" --noinform --disable-debugger
|
||||
check_status_maybe_lose "init-hooks execution order" $? 0 "(passed)"
|
||||
|
||||
exit $EXIT_TEST_WIN
|
||||
Loading…
Reference in a new issue