0.9.15.39: futex(FUTEX_WAIT) calls need to check for EINTR
[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 flag="condition-wait-sigcont.tmp"
15 touch $flag
16
17 ../src/runtime/sbcl --core ../output/sbcl.core --load condition-wait-sigcont.lisp &
18 sb_pid=$!
19
20 while [ -f $flag ]; do sleep 1; done
21 sleep 1
22 kill -STOP $sb_pid
23 kill -CONT $sb_pid
24
25 sleep 2
26 kill -KILL $sb_pid
27
28 if [ -f $flag ]
29 then
30     rm $flag
31     exit 1 # error
32 else
33     exit 104 # success
34 fi