mirror of
https://github.com/troglobit/finit.git
synced 2026-10-31 13:00:32 +00:00
exec_runtask(): Refactor, remove GLIBC:isms to build with musl
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
fdd13c1ae1
commit
f3a000560f
1 file changed
+4
-4
+4
-4
@@ -224,14 +224,14 @@ int exec_runtask(char *cmd, char *args[])
|
|||||||
NULL
|
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));
|
strlcat(buf, args[i], sizeof(buf));
|
||||||
if (args[i + 1])
|
|
||||||
strlcat(buf, " ", sizeof(buf));
|
|
||||||
}
|
}
|
||||||
logit(LOG_DEBUG, "Calling %s %s", _PATH_BSHELL, 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)
|
static void prepare_tty(char *tty, char *procname, int console)
|
||||||
|
|||||||
Reference in new issue
Block a user