1.0.23.36: typecheck :ALLOCATION :CLASS slot initforms in safe code
[sbcl/tcr.git] / tests / condition-wait-sigcont.lisp
blob35adec7dc7ed35545d9e002e26f84f013715832f
1 ;;;; prior to sbcl 0.9.15.39 a SIGSTOP and SIGCONT while waiting
2 ;;;; on CONDITION-WAIT caused a spurious wakeup.
4 ;;;; This software is part of the SBCL system. See the README file for
5 ;;;; more information.
6 ;;;;
7 ;;;; While most of SBCL is derived from the CMU CL system, the test
8 ;;;; files (like this one) were written from scratch after the fork
9 ;;;; from CMU CL.
10 ;;;
11 ;;;; This software is in the public domain and is provided with
12 ;;;; absoluely no warranty. See the COPYING and CREDITS files for
13 ;;;; more information.
15 (use-package :sb-thread)
17 (defvar *queue* (make-waitqueue))
18 (defvar *lock* (make-mutex :name "lock"))
20 (with-mutex (*lock*)
21 (write-line "/waiting")
22 (force-output)
23 (delete-file "condition-wait-sigcont.tmp")
24 (condition-wait *queue* *lock*)
25 (write-line "/woken")
26 (force-output)
27 (with-open-file (f "condition-wait-sigcont.tmp" :direction :output)
28 (write-line "woken!" f)))
30 (write-line "/oops!")
31 (force-output)
33 ;; sleep a bit so our runner can kill us
34 (sleep 10)
35 (quit)