diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-08-02 21:37:29 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-08-03 10:37:35 -0400 |
commit | a7f7d4a488c8d3b2461122765f9904c8a411a583 (patch) | |
tree | 7abee51265a8b9550c62255d0c6649935ee1d6a2 /sway/commands/reload.c | |
parent | f9a6407111a8730df51258c3b07502814a8ab3e1 (diff) |
Write to swaynag pipe fd directly on config errors
Diffstat (limited to 'sway/commands/reload.c')
-rw-r--r-- | sway/commands/reload.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/sway/commands/reload.c b/sway/commands/reload.c index 9bf671d9..f8ca374d 100644 --- a/sway/commands/reload.c +++ b/sway/commands/reload.c @@ -1,5 +1,4 @@ #define _XOPEN_SOURCE 500 -#include <signal.h> #include <string.h> #include "sway/commands.h" #include "sway/config.h" @@ -20,9 +19,7 @@ struct cmd_results *cmd_reload(int argc, char **argv) { list_add(bar_ids, strdup(bar->id)); } - char *errors = NULL; - if (!load_main_config(config->current_config_path, true, &errors)) { - free(errors); + if (!load_main_config(config->current_config_path, true, false)) { return cmd_results_new(CMD_FAILURE, "reload", "Error(s) reloading config."); } @@ -47,15 +44,5 @@ struct cmd_results *cmd_reload(int argc, char **argv) { arrange_windows(&root_container); - if (config->swaynag_pid > 0) { - kill(config->swaynag_pid, SIGTERM); - config->swaynag_pid = -1; - } - - if (errors) { - spawn_swaynag_config_errors(config, errors); - free(errors); - } - return cmd_results_new(CMD_SUCCESS, NULL, NULL); } |