mirror of
https://github.com/swaywm/sway.git
synced 2026-04-18 06:46:56 -04:00
Use execlp("sh") instead of execl("/bin/sh")
This stops assuming the POSIX shell command is located in /bin.
This commit is contained in:
parent
e3e99d961d
commit
7beeb9e61b
3 changed files with 7 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue