1 /* Tries to exploit bug in ppoll mask handling:
2 https://bugs.kde.org/show_bug.cgi?id=359871
3 where client program was able to successfully block VG_SIGVGKILL. */
5 #define _GNU_SOURCE /* for ppoll */
13 static pthread_mutex_t mutex
= PTHREAD_MUTEX_INITIALIZER
;
14 static pthread_cond_t cond
= PTHREAD_COND_INITIALIZER
;
19 pthread_mutex_lock(&mutex
);
21 pthread_cond_signal(&cond
);
22 pthread_mutex_unlock(&mutex
);
27 struct timespec ts
= {10000, 0};
28 ppoll(NULL
, 0, &ts
, &ss
);
38 int ret
= pthread_create(&thr
, NULL
, mythr
, NULL
);
40 fprintf(stderr
, "pthread_create failed\n");
44 pthread_mutex_lock(&mutex
);
46 pthread_cond_wait(&cond
, &mutex
);
48 pthread_mutex_unlock(&mutex
);
50 alarm(1); /* Unhandled SIGALRM should cause exit. */