diff --git a/Makefile b/Makefile index 3225e36..1d37622 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -Wall -Wextra -pedantic -lX11 -lXft -I/usr/include/freetype2 -pthread +CFLAGS = -Wall -Wextra -pedantic -lX11 -lXft -I/usr/include/freetype2 PREFIX ?= /usr/local CC ?= cc diff --git a/herbe.c b/herbe.c index 51d3990..dd105a2 100644 --- a/herbe.c +++ b/herbe.c @@ -7,7 +7,6 @@ #include #include #include -#include #include "config.h" @@ -82,10 +81,7 @@ void expire(int sig) int main(int argc, char *argv[]) { if (argc == 1) - { - sem_unlink("/herbe"); die("Usage: %s body", argv[0]); - } struct sigaction act_expire, act_ignore; @@ -171,9 +167,6 @@ int main(int argc, char *argv[]) XSelectInput(display, window, ExposureMask | ButtonPress); XMapWindow(display, window); - sem_t *mutex = sem_open("/herbe", O_CREAT, 0644, 1); - sem_wait(mutex); - sigaction(SIGUSR1, &act_expire, 0); sigaction(SIGUSR2, &act_expire, 0); @@ -204,9 +197,6 @@ int main(int argc, char *argv[]) } } - sem_post(mutex); - sem_close(mutex); - for (int i = 0; i < num_of_lines; i++) free(lines[i]);