Commit [f0da2f] Maximize Restore History

redesign exiting SBCL

Deprecate QUIT. It occupies an uncomfortable niche between processes
and threads, and doesn't actually do what it says on the tin unless
you call it from the main thread.

SIGTERM now uses EXIT, and doesn't depend on sessions.

WITH-DEADLINE (:SECONDS NIL :OVERRIDE T) can now be used to ignore
deadlines.

JOIN-THREAD on the main thread now blocks indefinitely instead of
claiming the thread did not exit normally.

New functions:

* SB-EXT:EXIT. Always exits the process. Takes keywords :CODE,
:ABORT, and :TIMEOUT. Code is the exit status. Abort controls if
the exit is clean (unwind, exit-hooks, terminate other threads) or
dirty. Timeout controls how long to wait for other threads to
finish.

* SB-THREAD:RETURN-FROM-THREAD. Normal termination for current
thread -- equivalent to return from the thread function with the
specified values. Takes keyword :ALLOW-EXIT, which determines if
returning from the main thread is an error, or equivalent to
calling EXIT :CODE 0.

* SB-THREAD:ABORT-THREAD. Abnormal termination for current thread --
equivalent to invoking the initial ABORT restart estabilished by
MAKE-THREAD (previously known as TERMINATE-THREAD, but ANSI
recommends there to always be an ABORT restart.) Takes keyword
:ALLOW-EXIT, which determines if aborting the main thread is an
error, or equivalent to calling EXIT :CODE 1.

* SB-THREAD:MAIN-THREAD-P. Let's you determine if a given thread is
the main thread of the process. This is important for some
functions on some operating systems -- and RETURN-FROM-THREAD and
ABORT-THREAD also need it.

* SB-THREAD:MAIN-THREAD. Returns the main thread object. Convenient
for when you need to eg. load a foreign library in the main
thread.

Nikodemus Siivola Nikodemus Siivola 2011-12-06

1 2 3 > >> (Page 1 of 3)
changed NEWS
changed contrib
changed contrib/asdf-module.mk
changed contrib/sb-aclrepl
changed contrib/sb-aclrepl/repl.lisp
changed contrib/sb-concurrency
changed contrib/sb-concurrency/tests
changed contrib/sb-concurrency/tests/test-gate.lisp
changed contrib/sb-executable
changed contrib/sb-executable/sb-executable.lisp
changed contrib/sb-posix
changed contrib/sb-posix/posix-tests.lisp
changed doc
changed doc/manual
changed doc/manual/create-contrib-doc-list.lisp
changed doc/manual/make-tempfiles.sh
changed doc/manual/start-stop.texinfo
changed doc/manual/threading.texinfo
changed doc/sbcl.1
changed make-windows-installer.sh
changed package-data-list.lisp-expr
changed src
changed src/code
changed src/code/cold-init.lisp
changed src/code/deadline.lisp
changed src/code/debug.lisp
changed src/code/save.lisp
changed src/code/target-signal.lisp
changed src/code/target-thread.lisp
changed src/code/toplevel.lisp
changed src/code/unix.lisp
changed tests
changed tests/callback.impure.lisp
changed tests/clos-cache.impure.lisp
changed tests/compiler.impure.lisp
changed tests/condition-wait-sigcont.lisp
changed tests/core.test.sh
changed tests/custom-userinit.lisp
changed tests/debug.impure.lisp
changed tests/dynamic-extent.impure.lisp
changed tests/enc-cn.impure.lisp
changed tests/enc-jpn.impure.lisp
changed tests/external-format.impure.lisp
changed tests/filesys.test.sh
changed tests/foreign.test.sh
changed tests/full-eval.impure.lisp
changed tests/interface.test.sh
changed tests/kill-non-lisp-thread.impure.lisp
changed tests/run-tests.lisp
changed tests/script.test.sh
changed tests/step.impure.lisp
changed tests/stream.test.sh
changed tests/stress-gc.sh
changed tests/swap-lispobjs.impure.lisp
changed tests/threads.impure.lisp
changed tests/threads.pure.lisp
changed tests/threads.test.sh
changed tests/undefined-classoid-bug.test.sh
changed tests/unwind-to-frame-and-call.impure.lisp
changed tests/win32-foreign-stack-unwind.impure.lisp
changed tools-for-build
changed tools-for-build/ldso-stubs.lisp
NEWS Diff Switch to side-by-side view
Loading...
contrib
Directory.
contrib/asdf-module.mk Diff Switch to side-by-side view
Loading...
contrib/sb-aclrepl
Directory.
contrib/sb-aclrepl/repl.lisp Diff Switch to side-by-side view
Loading...
contrib/sb-concurrency/tests/test-gate.lisp Diff Switch to side-by-side view
Loading...
contrib/sb-executable/sb-executable.lisp Diff Switch to side-by-side view
Loading...
contrib/sb-posix
Directory.
contrib/sb-posix/posix-tests.lisp Diff Switch to side-by-side view
Loading...
doc
Directory.
doc/manual
Directory.
doc/manual/create-contrib-doc-list.lisp Diff Switch to side-by-side view
Loading...
doc/manual/make-tempfiles.sh Diff Switch to side-by-side view
Loading...
doc/manual/start-stop.texinfo Diff Switch to side-by-side view
Loading...
doc/manual/threading.texinfo Diff Switch to side-by-side view
Loading...
doc/sbcl.1 Diff Switch to side-by-side view
Loading...
make-windows-installer.sh Diff Switch to side-by-side view
Loading...
package-data-list.lisp-expr Diff Switch to side-by-side view
Loading...
src
Directory.
src/code
Directory.
src/code/cold-init.lisp Diff Switch to side-by-side view
Loading...
src/code/deadline.lisp Diff Switch to side-by-side view
Loading...
src/code/debug.lisp Diff Switch to side-by-side view
Loading...
src/code/save.lisp Diff Switch to side-by-side view
Loading...
src/code/target-signal.lisp Diff Switch to side-by-side view
Loading...
src/code/target-thread.lisp Diff Switch to side-by-side view
Loading...
src/code/toplevel.lisp Diff Switch to side-by-side view
Loading...
src/code/unix.lisp Diff Switch to side-by-side view
Loading...
tests
Directory.
tests/callback.impure.lisp Diff Switch to side-by-side view
Loading...
tests/clos-cache.impure.lisp Diff Switch to side-by-side view
Loading...
tests/compiler.impure.lisp Diff Switch to side-by-side view
Loading...
tests/condition-wait-sigcont.lisp Diff Switch to side-by-side view
Loading...
tests/core.test.sh Diff Switch to side-by-side view
Loading...
tests/custom-userinit.lisp Diff Switch to side-by-side view
Loading...
tests/debug.impure.lisp Diff Switch to side-by-side view
Loading...
tests/dynamic-extent.impure.lisp Diff Switch to side-by-side view
Loading...
tests/enc-cn.impure.lisp Diff Switch to side-by-side view
Loading...
tests/enc-jpn.impure.lisp Diff Switch to side-by-side view
Loading...
tests/external-format.impure.lisp Diff Switch to side-by-side view
Loading...
tests/filesys.test.sh Diff Switch to side-by-side view
Loading...
tests/foreign.test.sh Diff Switch to side-by-side view
Loading...
tests/full-eval.impure.lisp Diff Switch to side-by-side view
Loading...
tests/interface.test.sh Diff Switch to side-by-side view
Loading...
tests/kill-non-lisp-thread.impure.lisp Diff Switch to side-by-side view
Loading...
tests/run-tests.lisp Diff Switch to side-by-side view
Loading...
tests/script.test.sh Diff Switch to side-by-side view
Loading...
tests/step.impure.lisp Diff Switch to side-by-side view
Loading...
tests/stream.test.sh Diff Switch to side-by-side view
Loading...
tests/stress-gc.sh Diff Switch to side-by-side view
Loading...
tests/swap-lispobjs.impure.lisp Diff Switch to side-by-side view
Loading...
tests/threads.impure.lisp Diff Switch to side-by-side view
Loading...
tests/threads.pure.lisp Diff Switch to side-by-side view
Loading...
tests/threads.test.sh Diff Switch to side-by-side view
Loading...
tests/undefined-classoid-bug.test.sh Diff Switch to side-by-side view
Loading...
tests/unwind-to-frame-and-call.impure.lisp Diff Switch to side-by-side view
Loading...
tests/win32-foreign-stack-unwind.impure.lisp Diff Switch to side-by-side view
Loading...
tools-for-build
Directory.
tools-for-build/ldso-stubs.lisp Diff Switch to side-by-side view
Loading...
1 2 3 > >> (Page 1 of 3)