From 8b834cd6928c573866627f41eacf2525d6211060 Mon Sep 17 00:00:00 2001 From: Diego Santa Cruz Date: Wed, 9 Sep 2020 16:50:02 +0000 Subject: llmnrd: create pid file when daemonizing, and remove it on exit The path of the pid file is /run/llmnrd/pid by default but can be changed via the PIDFILE make variable. Fixes #18 Signed-off-by: Diego Santa Cruz --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b160b78..675535a 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,9 @@ else GIT_VERSION = endif -CFLAGS_MIN := -W -Wall -DVERSION_STRING=\"v$(VERSION)\" -DGIT_VERSION=\"$(GIT_VERSION)\" +PIDFILE ?= /run/llmnrd/pid + +CFLAGS_MIN := -W -Wall -DVERSION_STRING=\"v$(VERSION)\" -DGIT_VERSION=\"$(GIT_VERSION)\" -DPIDFILE=\"$(PIDFILE)\" ifeq ($(DEBUG), 1) CFLAGS_MIN += -g -DDEBUG endif -- cgit v1.2.3-54-g00ecf