]> git.mdlowis.com Git - proto/labwc.git/commitdiff
action.c: use kill() instead of spawning killall
authorJohan Malm <jgm323@gmail.com>
Tue, 14 Jun 2022 21:45:45 +0000 (22:45 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 14 Jun 2022 22:46:27 +0000 (00:46 +0200)
Also update documentation to say `killall -s SIGHUP labwc` to make
it work on Void Linux.

Fix #393

README.md
src/action.c

index 82c5350b24a099f96235118f52b5b8ff45d2e551..64619f33aba81ce18b4d48751031b3fbd3fe6028 100644 (file)
--- a/README.md
+++ b/README.md
@@ -88,7 +88,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 -SIGHUP labwc`)
 
 For keyboard settings, see [environment] and [xkeyboard-config(7)]
 
index 4089d680f19e64cb74924dee1eec3622cd191e22..d9f22eb1b2eec341199bf1513b01996d1c282683 100644 (file)
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #include <strings.h>
 #include <wlr/util/log.h>
+#include <signal.h>
 #include "common/spawn.h"
 #include "common/zfree.h"
 #include "debug.h"
@@ -200,8 +201,7 @@ actions_run(struct view *activator, struct server *server,
                        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);