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 > >> (Page 1 of 2)
changed contrib/sb-aclrepl/repl.lisp
changed contrib/sb-concurrency/tests/test-gate.lisp
changed contrib/sb-executable/sb-executable.lisp
changed contrib/sb-posix/posix-tests.lisp
changed contrib/asdf-module.mk
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 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/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
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/posix-tests.lisp Diff Switch to side-by-side view
Loading...
contrib/asdf-module.mk Diff Switch to side-by-side view
Loading...
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...
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/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...
1 2 > >> (Page 1 of 2)