X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fsignals.impure.lisp;h=093bf23cbafb7aa4c3e4933a414c22927069abb3;hb=ab5427d31da2bd95805cccc8e47b8f43d3dd606d;hp=675fd8a450af1d541e3eec56179a2785d4f7043c;hpb=3dd90b64c37103d9c86d32b6c36277a6cea4098a;p=sbcl.git diff --git a/tests/signals.impure.lisp b/tests/signals.impure.lisp index 675fd8a..093bf23 100644 --- a/tests/signals.impure.lisp +++ b/tests/signals.impure.lisp @@ -56,3 +56,28 @@ (loop until returning) (loop repeat 1000000000) (assert (= saved-errno (sb-unix::get-errno))))) + +(with-test (:name :handle-interactive-interrupt) + (assert (eq :condition + (handler-case + (sb-thread::kill-safely + (sb-thread::thread-os-thread sb-thread::*current-thread*) + sb-unix:sigint) + (sb-sys:interactive-interrupt () + :condition))))) + +(with-test (:name :bug-640516) + ;; On Darwin interrupting a SLEEP so that it took longer than + ;; the requested amount caused it to hang. + (assert + (handler-case + (sb-ext:with-timeout 10 + (let (to) + (handler-bind ((sb-ext:timeout (lambda (c) + (unless to + (setf to t) + (sleep 2) + (continue c))))) + (sb-ext:with-timeout 0.1 (sleep 1) t)))) + (sb-ext:timeout () + nil))))