From 67ed9869698c02daa611d2cd36d8694619512247 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Tue, 14 Jun 2022 22:45:45 +0100 Subject: [PATCH] action.c: use kill() instead of spawning killall Also update documentation to say `killall -s SIGHUP labwc` to make it work on Void Linux. Fix #393 Backport of 5f30773a6e90b7787b9facdf1495aff489b65f28 --- README.md | 2 +- src/action.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3b28321d..5f577747 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Labwc uses the files listed below for configuration and theming. The example [rc.xml] has been kept simple. For all options and default values, see [rc.xml.all] -Configuration and theme files are reloaded on receiving SIGHUP (e.g. `killall -SIGHUP labwc`) +Configuration and theme files are reloaded on receiving SIGHUP (e.g. `killall -s SIGHUP labwc`) For keyboard settings, see [environment] and [xkeyboard-config(7)] diff --git a/src/action.c b/src/action.c index dfb6ed59..e0a6657b 100644 --- a/src/action.c +++ b/src/action.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only #include #include +#include #include "common/spawn.h" #include "common/zfree.h" #include "labwc.h" @@ -193,8 +194,7 @@ action(struct view *activator, struct server *server, struct wl_list *actions, u osd_update(server); break; case ACTION_TYPE_RECONFIGURE: - /* Should be changed to signal() */ - spawn_async_no_shell("killall -SIGHUP labwc"); + kill(getpid(), SIGHUP); break; case ACTION_TYPE_SHOW_MENU: show_menu(server, view, action->arg);