diff options
-rw-r--r-- | sway/config/bar.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/config/bar.c b/sway/config/bar.c index 2913f059..cb9e82f8 100644 --- a/sway/config/bar.c +++ b/sway/config/bar.c | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | static void terminate_swaybar(pid_t pid) { | 18 | static void terminate_swaybar(pid_t pid) { |
19 | wlr_log(L_DEBUG, "Terminating swaybar %d", pid); | 19 | wlr_log(L_DEBUG, "Terminating swaybar %d", pid); |
20 | int ret = kill(pid, SIGTERM); | 20 | int ret = kill(-pid, SIGTERM); |
21 | if (ret != 0) { | 21 | if (ret != 0) { |
22 | wlr_log_errno(L_ERROR, "Unable to terminate swaybar %d", pid); | 22 | wlr_log_errno(L_ERROR, "Unable to terminate swaybar %d", pid); |
23 | } else { | 23 | } else { |
@@ -163,6 +163,7 @@ void invoke_swaybar(struct bar_config *bar) { | |||
163 | 163 | ||
164 | bar->pid = fork(); | 164 | bar->pid = fork(); |
165 | if (bar->pid == 0) { | 165 | if (bar->pid == 0) { |
166 | setpgid(0, 0); | ||
166 | close(filedes[0]); | 167 | close(filedes[0]); |
167 | 168 | ||
168 | // run custom swaybar | 169 | // run custom swaybar |