1.0.27.46: Fix build on systems with "src" in the path.
[sbcl/tcr.git] / tests / threads.test.sh
blobcc2de115b0688c7b36aa20f521523af753fe33bc
1 #!/bin/sh
3 # This software is part of the SBCL system. See the README file for
4 # more information.
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.
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.
14 . ./subr.sh
15 use_test_subdirectory
17 flag="condition-wait-sigcont.tmp"
18 touch $flag
20 # $! is not set correctly when calling run_sbcl, do it directly
21 "$SBCL_RUNTIME" --core "$SBCL_CORE" $SBCL_ARGS \
22 --load "$SBCL_PWD/condition-wait-sigcont.lisp" &
23 sb_pid=$!
25 while [ -f $flag ]; do sleep 1; done
26 sleep 1
27 kill -STOP $sb_pid
28 kill -CONT $sb_pid
30 sleep 2
31 kill -KILL $sb_pid
33 if [ -f $flag ]
34 then
35 rm $flag
36 exit 1 # error
37 else
38 exit 104 # success