mirror of
https://github.com/Pithikos/C-Thread-Pool
synced 2024-11-22 21:51:29 +03:00
Merge pull request #128 from dunglas/fix/SA_ONSTACK_declaration
fix: ensure that SA_ONSTACK is declared
This commit is contained in:
commit
9577c67e92
5
thpool.c
5
thpool.c
@ -14,6 +14,9 @@
|
||||
#ifndef _POSIX_C_SOURCE
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
#ifndef _XOPEN_SOURCE
|
||||
#define _XOPEN_SOURCE 500
|
||||
#endif
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
@ -349,7 +352,7 @@ static void* thread_do(struct thread* thread_p){
|
||||
/* Register signal handler */
|
||||
struct sigaction act;
|
||||
sigemptyset(&act.sa_mask);
|
||||
act.sa_flags = 0;
|
||||
act.sa_flags = SA_ONSTACK;
|
||||
act.sa_handler = thread_hold;
|
||||
if (sigaction(SIGUSR1, &act, NULL) == -1) {
|
||||
err("thread_do(): cannot handle SIGUSR1");
|
||||
|
Loading…
Reference in New Issue
Block a user