Update the call site of exec to accommodate the environment variables

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-04-21 11:55:35 +08:00 committed by Petro Karashchenko
parent d60fb1168d
commit 1acca2946e
3 changed files with 4 additions and 4 deletions

View File

@ -359,7 +359,7 @@ int main(int argc, FAR char *argv[])
args[0] = (FAR char *)dirlist[i];
args[1] = NULL;
ret = exec(filename, args, g_elf_exports, g_elf_nexports);
ret = exec(filename, args, NULL, g_elf_exports, g_elf_nexports);
mm_update(&g_mmstep, "after exec");

View File

@ -213,7 +213,7 @@ int main(int argc, FAR char *argv[])
args[0] = (FAR char *)dirlist[i];
args[1] = NULL;
ret = exec(filename, args, g_nxflat_exports, g_nxflat_nexports);
ret = exec(filename, args, NULL, g_nxflat_exports, g_nxflat_nexports);
if (ret < 0)
{
errmsg("ERROR: exec(%s) failed: %d\n", dirlist[i], errno);

View File

@ -886,10 +886,10 @@ static int cgi_child(int argc, char **argv)
ninfo("Starting CGI: %s\n", hc->expnfilename);
#ifdef CONFIG_THTTPD_NXFLAT
child = exec(hc->expnfilename, (FAR char * const *)argp,
child = exec(hc->expnfilename, argp, NULL,
g_thttpdsymtab, g_thttpdnsymbols);
#else
child = exec(hc->expnfilename, (FAR char * const *)argp, NULL, 0);
child = exec(hc->expnfilename, argp, NULL, NULL, 0);
#endif
if (child < 0)
{