mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 13:33:09 +07:00
exec_runtask(): Refactor, remove GLIBC:isms to build with musl
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+4
-4
@@ -224,14 +224,14 @@ int exec_runtask(char *cmd, char *args[])
|
||||
NULL
|
||||
};
|
||||
|
||||
for (i = 0; args[i]; i++) {
|
||||
strlcat(buf, cmd, sizeof(buf));
|
||||
for (i = 1; args[i]; i++) {
|
||||
strlcat(buf, " ", sizeof(buf));
|
||||
strlcat(buf, args[i], sizeof(buf));
|
||||
if (args[i + 1])
|
||||
strlcat(buf, " ", sizeof(buf));
|
||||
}
|
||||
logit(LOG_DEBUG, "Calling %s %s", _PATH_BSHELL, buf);
|
||||
|
||||
return execve(_PATH_BSHELL, argv, __environ);
|
||||
return execvp(_PATH_BSHELL, argv);
|
||||
}
|
||||
|
||||
static void prepare_tty(char *tty, char *procname, int console)
|
||||
|
||||
Reference in New Issue
Block a user