X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fkill-non-lisp-thread.impure.lisp;h=f7f88fd9b9068ac082c1dfc2a4398ad197aaf300;hb=d7875c296a4988e9f27e2776237884deb1984c62;hp=8a4b661f2a8c00eacd8110aa45e19003121bc720;hpb=9ee246f59019b776b38f6c09b2ce730cd0b32844;p=sbcl.git diff --git a/tests/kill-non-lisp-thread.impure.lisp b/tests/kill-non-lisp-thread.impure.lisp index 8a4b661..f7f88fd 100644 --- a/tests/kill-non-lisp-thread.impure.lisp +++ b/tests/kill-non-lisp-thread.impure.lisp @@ -11,8 +11,8 @@ ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. -#-sb-thread -(sb-ext:quit :unix-status 104) +#+(or :win32 (not :sb-thread)) +(sb-ext:exit :code 104) (use-package :sb-alien) @@ -21,7 +21,6 @@ (output (with-output-to-string (s) (setf proc (run-program program arguments - :search (not (eql #\. (char program 0))) :output s))))) (unless (zerop (process-exit-code proc)) (error "Bad exit code: ~S~%Output:~% ~S" @@ -29,13 +28,9 @@ output)) output)) -(run "cc" "-O3" - "-I" "../src/runtime/" - "kill-non-lisp-thread.c" - #+(and (or linux freebsd) (or x86-64 ppc mips)) "-fPIC" - #+(and x86-64 darwin) "-arch" #+(and x86-64 darwin) "x86_64" - #+darwin "-bundle" #-darwin "-shared" - "-o" "kill-non-lisp-thread.so") +(run "/bin/sh" "run-compiler.sh" "-sbcl-pic" "-sbcl-shared" + "-O3" "-I" "../src/runtime/" + "kill-non-lisp-thread.c" "-o" "kill-non-lisp-thread.so") (load-shared-object (truename "kill-non-lisp-thread.so")) @@ -46,6 +41,12 @@ (push (lambda () (setq receivedp t)) (sb-thread::thread-interruptions sb-thread:*current-thread*)) + #+sb-thruption + ;; On sb-thruption builds, the usual resignalling of SIGPIPE will + ;; work without problems, but the signal handler won't ordinarily + ;; think that there's anything to be done. Since we're poking at + ;; INTERRUPT-THREAD internals anyway, let's help it along. + (setf sb-unix::*thruption-pending* t) (kill-non-lisp-thread) (sleep 1) (assert receivedp)))