mirror of
https://github.com/swaywm/sway.git
synced 2025-11-26 06:59:59 -05:00
Free bar configs on reload and exit
This commit is contained in:
parent
0441d12479
commit
18173fb5ad
2 changed files with 12 additions and 7 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include "log.h"
|
||||
|
||||
static void terminate_swaybar(pid_t pid) {
|
||||
wlr_log(L_DEBUG, "Terminating swaybar %d", pid);
|
||||
int ret = kill(pid, SIGTERM);
|
||||
if (ret != 0) {
|
||||
wlr_log_errno(L_ERROR, "Unable to terminate swaybar %d", pid);
|
||||
|
|
@ -185,6 +186,7 @@ void invoke_swaybar(struct bar_config *bar) {
|
|||
execvp(cmd[0], cmd);
|
||||
exit(1);
|
||||
}
|
||||
wlr_log(L_DEBUG, "Spawned swaybar %d", bar->pid);
|
||||
close(filedes[0]);
|
||||
ssize_t len;
|
||||
if (read(filedes[1], &len, sizeof(int)) == sizeof(int)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue