From 1acca2946ef97592e0b2133db73cc881526e984d Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Thu, 21 Apr 2022 11:55:35 +0800 Subject: [PATCH] Update the call site of exec to accommodate the environment variables Signed-off-by: Xiang Xiao --- examples/elf/elf_main.c | 2 +- examples/nxflat/nxflat_main.c | 2 +- netutils/thttpd/thttpd_cgi.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c index ebcc5e97a..d571030e7 100644 --- a/examples/elf/elf_main.c +++ b/examples/elf/elf_main.c @@ -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"); diff --git a/examples/nxflat/nxflat_main.c b/examples/nxflat/nxflat_main.c index 96fe4c6f6..b1e996da9 100644 --- a/examples/nxflat/nxflat_main.c +++ b/examples/nxflat/nxflat_main.c @@ -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); diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c index 7c6294a4f..5f3ba1a54 100644 --- a/netutils/thttpd/thttpd_cgi.c +++ b/netutils/thttpd/thttpd_cgi.c @@ -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) {