aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/commands/exec_always.c2
-rw-r--r--sway/swaynag.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c
index 39e48a44..3786bfb7 100644
--- a/sway/commands/exec_always.c
+++ b/sway/commands/exec_always.c
@@ -65,7 +65,7 @@ struct cmd_results *cmd_exec_process(int argc, char **argv) {
close(fd[0]);
if ((child = fork()) == 0) {
close(fd[1]);
- execl("/bin/sh", "/bin/sh", "-c", cmd, (void *)NULL);
+ execlp("sh", "sh", "-c", cmd, (void *)NULL);
_exit(0);
}
ssize_t s = 0;
diff --git a/sway/swaynag.c b/sway/swaynag.c
index db5a919a..ba582989 100644
--- a/sway/swaynag.c
+++ b/sway/swaynag.c
@@ -87,8 +87,8 @@ bool swaynag_spawn(const char *swaynag_command,
size_t length = strlen(swaynag_command) + strlen(swaynag->args) + 2;
char *cmd = malloc(length);
snprintf(cmd, length, "%s %s", swaynag_command, swaynag->args);
- execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
- sway_log_errno(SWAY_ERROR, "execl failed");
+ execlp("sh", "sh", "-c", cmd, NULL);
+ sway_log_errno(SWAY_ERROR, "execlp failed");
_exit(EXIT_FAILURE);
}
_exit(EXIT_SUCCESS);