diff options
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | src/eloop.c | 5 | ||||
-rw-r--r-- | src/pty.c | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 6d63cf3..f5c7d43 100644 --- a/Makefile.am +++ b/Makefile.am @@ -97,7 +97,8 @@ libkmscon_core_la_LIBADD = \ $(FREETYPE2_LIBS) \ $(XPROTO_LIBS) \ $(XKBCOMMON_LIBS) \ - $(GLIB_LIBS) + $(GLIB_LIBS) \ + -lpthread kmscon_SOURCES = src/main.c kmscon_LDADD = libkmscon-core.la diff --git a/src/eloop.c b/src/eloop.c index 239c6d5..f0bae2b 100644 --- a/src/eloop.c +++ b/src/eloop.c @@ -32,6 +32,7 @@ */ #include <errno.h> +#include <pthread.h> #include <signal.h> #include <stdbool.h> #include <stdlib.h> @@ -540,7 +541,7 @@ int ev_eloop_add_signal(struct ev_eloop *loop, struct ev_signal *sig, return ret; } - sigprocmask(SIG_BLOCK, &mask, NULL); + pthread_sigmask(SIG_BLOCK, &mask, NULL); sig->cb = cb; sig->data = data; ev_signal_ref(sig); @@ -617,7 +618,7 @@ static int signal_new(struct ev_signal_shared **out, struct ev_eloop *loop, if (ret) goto err_sig; - sigprocmask(SIG_BLOCK, &mask, NULL); + pthread_sigmask(SIG_BLOCK, &mask, NULL); sig->next = loop->sig_list; loop->sig_list = sig; @@ -25,6 +25,7 @@ #include <errno.h> #include <fcntl.h> +#include <pthread.h> #include <pty.h> #include <signal.h> #include <stdlib.h> @@ -131,7 +132,7 @@ static int setup_child(int master, struct winsize *ws) /* The child should not inherit our signal mask. */ sigemptyset(&sigset); - ret = sigprocmask(SIG_SETMASK, &sigset, NULL); + ret = pthread_sigmask(SIG_SETMASK, &sigset, NULL); if (ret) log_warn("cannot reset blocked signals: %m"); |