Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 0 additions & 10 deletions herbe.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <string.h>
#include <stdarg.h>
#include <fcntl.h>
#include <semaphore.h>

#include "config.h"

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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]);

Expand Down