aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/exec_always.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-04-16 10:32:32 +0200
committerKenny Levinsen <kl@kl.wtf>2021-04-22 23:12:49 +0200
commit31a2252e83a39ae9be8f9572179fe161c54f715d (patch)
treeac726738dbb7ea1cc879484312d0bb302d1048f2 /sway/commands/exec_always.c
parent7beeb9e61b7f18a8c2e9aa015958cffde9b76c05 (diff)
commands/exec_always: log error on execlp failure
And exit(1) instead of indicating success.
Diffstat (limited to 'sway/commands/exec_always.c')
-rw-r--r--sway/commands/exec_always.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c
index 3786bfb7..781c86c9 100644
--- a/sway/commands/exec_always.c
+++ b/sway/commands/exec_always.c
@@ -66,7 +66,8 @@ struct cmd_results *cmd_exec_process(int argc, char **argv) {
if ((child = fork()) == 0) {
close(fd[1]);
execlp("sh", "sh", "-c", cmd, (void *)NULL);
- _exit(0);
+ sway_log_errno(SWAY_ERROR, "execlp failed");
+ _exit(1);
}
ssize_t s = 0;
while ((size_t)s < sizeof(pid_t)) {