From 62d55296c0eb41f1b18b1943fa7aa06e4893d736 Mon Sep 17 00:00:00 2001 From: liuli Date: Mon, 21 Aug 2023 05:07:43 +0000 Subject: Update my_posix_spawnp() --- src/wrapped/wrappedlibc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 06726923..b0241375 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -2228,6 +2228,10 @@ EXPORT int32_t my_posix_spawnp(x64emu_t* emu, pid_t* pid, const char* path, int script = (my_context->bashpath && FileIsShell(fullpath))?1:0; int ret; printf_log(/*LOG_DEBUG*/LOG_INFO, "posix_spawnp(%p, \"%s\", %p, %p, %p, %p), IsX86=%d / fullpath=\"%s\"\n", pid, path, actions, attrp, argv, envp, x64, fullpath); + // hack to update the environ var if needed + if(envp == my_context->envv && environ) { + envp = environ; + } if (x64 || x86 || script || self) { int n=1; while(argv[n]) ++n; -- cgit 1.4.1