summary refs log tree commit diff
path: root/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'service.c')
-rw-r--r--service.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/service.c b/service.c
index 63a647c..ec7ac68 100644
--- a/service.c
+++ b/service.c
@@ -174,6 +174,7 @@ void serviceStart(struct Service *service) {
 		return;
 	}
 
+	setpgid(0, 0);
 	dup2(service->outPipe[1], STDOUT_FILENO);
 	dup2(service->errPipe[1], STDERR_FILENO);
 
@@ -207,10 +208,10 @@ void serviceStart(struct Service *service) {
 
 void serviceSignal(struct Service *service, int signal) {
 	if (service->state != Start) return;
-	int error = kill(service->pid, signal);
+	int error = killpg(service->pid, signal);
 	if (error) {
 		syslog(
-			LOG_WARNING, "kill(%s[%d], %s): %m",
+			LOG_WARNING, "killpg(%s[%d], %s): %m",
 			service->name, service->pid, sys_signame[signal]
 		);
 	}
/src/commit/bin/htagml.c?id=ceee655658a4a990797e99750d2732e9e4d8e9d1&follow=1'>Process htagml file line by lineJune McEnroe 2021-01-12Split fields by tab onlyJune McEnroe 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe 2021-01-09Add c -t flag to print expression typeJune McEnroe 2021-01-05Update taglineJune McEnroe