aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/exec_always.c
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2021-04-16 10:31:30 +0200
committerLibravatar Kenny Levinsen <kl@kl.wtf>2021-04-22 23:12:49 +0200
commit7beeb9e61b7f18a8c2e9aa015958cffde9b76c05 (patch)
tree78290c40b4cd40e87652387ca9fc8c45b73b857b /sway/commands/exec_always.c
parentAvoid creating zero-sized textures for marks (diff)
downloadsway-7beeb9e61b7f18a8c2e9aa015958cffde9b76c05.tar.gz
sway-7beeb9e61b7f18a8c2e9aa015958cffde9b76c05.tar.zst
sway-7beeb9e61b7f18a8c2e9aa015958cffde9b76c05.zip
Use execlp("sh") instead of execl("/bin/sh")
This stops assuming the POSIX shell command is located in /bin.
Diffstat (limited to 'sway/commands/exec_always.c')
-rw-r--r--sway/commands/exec_always.c2
1 files changed, 1 insertions, 1 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) {
65 close(fd[0]); 65 close(fd[0]);
66 if ((child = fork()) == 0) { 66 if ((child = fork()) == 0) {
67 close(fd[1]); 67 close(fd[1]);
68 execl("/bin/sh", "/bin/sh", "-c", cmd, (void *)NULL); 68 execlp("sh", "sh", "-c", cmd, (void *)NULL);
69 _exit(0); 69 _exit(0);
70 } 70 }
71 ssize_t s = 0; 71 ssize_t s = 0;