7 /* This reproduces bugs 409141 and 409367.
8 valgrind ./pth_self_kill 9 was hanging.
10 valgrind ./pth_self_kill 15 killotherthread was looping.
18 printf ("error: supposed to die without printing this\n");
23 void handler_15(int signum
)
25 pthread_join(parent_thr
, NULL
);
29 int main(int argc
, char **argv
)
33 parent_thr
= pthread_self();
35 struct sigaction sa_old
;
36 struct sigaction sa_new
;
38 sigaction(15, NULL
, &sa_old
);
39 sa_new
.sa_mask
= sa_old
.sa_mask
;
40 sa_new
.sa_flags
= sa_old
.sa_flags
;
41 sa_new
.sa_handler
= &handler_15
;
42 sigaction(15, &sa_new
, NULL
);
48 ("usage: pth_self_kill SIGNALNR [killotherthread] [sleepafterkill]\n");
52 int s
= atoi(argv
[1]);
54 pthread_create(&thr
, NULL
, t
, NULL
);
64 sigaction(15, &sa_old
, NULL
);