From c8676fad54bb0f4152947a6781626872bfa6ad64 Mon Sep 17 00:00:00 2001 From: Tamino Bauknecht Date: Tue, 12 Dec 2023 22:54:31 +0100 Subject: sway/output: Improve logging of swaybg execvp failure and more checks This doesn't catch the error if a background changing command is executed via swaymsg, but improves logging. The additional checks at least propagate if e.g. forking failed. --- sway/commands/output.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sway/commands') diff --git a/sway/commands/output.c b/sway/commands/output.c index df32c673..462dffd2 100644 --- a/sway/commands/output.c +++ b/sway/commands/output.c @@ -111,7 +111,10 @@ struct cmd_results *cmd_output(int argc, char **argv) { if (!config->reloading && !config->validating) { apply_output_config_to_outputs(output); if (background) { - spawn_swaybg(); + if (!spawn_swaybg()) { + return cmd_results_new(CMD_FAILURE, + "Failed to apply background configuration"); + } } } -- cgit v1.2.3