repo.or.cz
/
sbcl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
rename recently-added tests
[sbcl.git]
/
tests
/
kill-non-lisp-thread.c
blob
3af7f17f31bf29ba2c113095317dcc99bb18c9e2
1
#include <pthread.h>
2
#include <signal.h>
3
4
void
5
wait_a_bit
(
void
)
6
{
7
sleep
(
5
);
8
}
9
10
void
11
kill_non_lisp_thread
(
void
)
12
{
13
pthread_t kid
;
14
if
(
pthread_create
(&
kid
,
0
, (
void
*(*)(
void
*))
wait_a_bit
,
0
) <
0
) {
15
perror
(
"pthread_create"
);
16
exit
(
1
);
17
}
18
pthread_kill
(
kid
,
SIGPIPE
);
19
}