diff options
author | Simon Ser <[email protected]> | 2021-04-16 10:31:30 +0200 |
---|---|---|
committer | Kenny Levinsen <[email protected]> | 2021-04-22 23:12:49 +0200 |
commit | 7beeb9e61b7f18a8c2e9aa015958cffde9b76c05 (patch) | |
tree | 78290c40b4cd40e87652387ca9fc8c45b73b857b /sway/swaynag.c | |
parent | e3e99d961dc445258c08ec47b22ec83af38197f6 (diff) |
Use execlp("sh") instead of execl("/bin/sh")
This stops assuming the POSIX shell command is located in /bin.
Diffstat (limited to 'sway/swaynag.c')
-rw-r--r-- | sway/swaynag.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |