sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit b9726afd485a9eca0aa7d123db1e55edb7bfc386
parent 64e0731cc7206e8becfe6f80bc58362aa53f07b6
Author: Geoff Greer <geoff@greer.fm>
Date:   Thu, 26 Apr 2018 18:13:44 -0700

invoke_swaybar(): Set process group. Kill process group.

Fixes a bug where terminate_swaybar() did not terminate swaybar.

Diffstat:
Msway/config/bar.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sway/config/bar.c b/sway/config/bar.c @@ -17,7 +17,7 @@ static void terminate_swaybar(pid_t pid) { wlr_log(L_DEBUG, "Terminating swaybar %d", pid); - int ret = kill(pid, SIGTERM); + int ret = kill(-pid, SIGTERM); if (ret != 0) { wlr_log_errno(L_ERROR, "Unable to terminate swaybar %d", pid); } else { @@ -163,6 +163,7 @@ void invoke_swaybar(struct bar_config *bar) { bar->pid = fork(); if (bar->pid == 0) { + setpgid(0, 0); close(filedes[0]); // run custom swaybar