1.0.13.1: Various cleanups and touchups in tests/
[sbcl.git] / tests / threads.test.sh
1 #!/bin/sh
2
3 # This software is part of the SBCL system. See the README file for
4 # more information.
5 #
6 # While most of SBCL is derived from the CMU CL system, the test
7 # files (like this one) were written from scratch after the fork
8 # from CMU CL.
9 #
10 # This software is in the public domain and is provided with
11 # absolutely no warranty. See the COPYING and CREDITS files for
12 # more information.
13
14 . ./subr.sh
15 use_test_subdirectory
16
17 flag="condition-wait-sigcont.tmp"
18 touch $flag
19
20 run_sbcl --load "$SBCL_PWD/condition-wait-sigcont.lisp" &
21 sb_pid=$!
22
23 while [ -f $flag ]; do sleep 1; done
24 sleep 1
25 kill -STOP $sb_pid
26 kill -CONT $sb_pid
27
28 sleep 2
29 kill -KILL $sb_pid
30
31 if [ -f $flag ]
32 then
33     rm $flag
34     exit 1 # error
35 else
36     exit 104 # success
37 fi