repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
none/tests/fdleak_cmsg_supp.supp: Add suppressions for older glibc
[valgrind.git]
/
none
/
tests
/
sigsusp.c
blob
0977e262425ffd6296ba41e8c4e9a7d66269a740
1
#include <stdlib.h>
2
#include <pthread.h>
3
#include <unistd.h>
4
#include <stdio.h>
5
#include <signal.h>
6
static void
*
t_fn
(
void
*
v
)
7
{
8
sigset_t mask
;
9
10
sigfillset
(&
mask
);
11
sigsuspend
(&
mask
);
12
return
NULL
;
13
}
14
15
int
main
(
int
argc
,
char
*
argv
[])
16
{
17
pthread_t t1
;
18
19
pthread_create
(&
t1
,
NULL
,
t_fn
,
NULL
);
20
21
sleep
(
1
);
// Should be enough to have the thread in sigsuspend
22
// printf("dying\n");
23
exit
(
0
);
24
}