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
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
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"))
21 (write-line "/waiting")
23 (delete-file "condition-wait-sigcont.tmp")
25 (condition-wait *queue* *lock*)
30 (with-open-file (f "condition-wait-sigcont.tmp" :direction :output)
31 (write-line "woken!" f)))
36 ;; sleep a bit so our runner can kill us