diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-08-21 08:32:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-21 08:32:05 +0200 |
| commit | 33d8fa7b23e06b2043cbcd8706e8129c92587d83 (patch) | |
| tree | 29c6109a0363706794b75a0c3ab1e9fe31ac0d00 | |
| parent | 8e7afcc5fb6c320126c06bc46f7691fb2199634d (diff) | |
| parent | 62d55296c0eb41f1b18b1943fa7aa06e4893d736 (diff) | |
| download | box64-33d8fa7b23e06b2043cbcd8706e8129c92587d83.tar.gz box64-33d8fa7b23e06b2043cbcd8706e8129c92587d83.zip | |
Merge pull request #942 from liuli0217/main
Update my_posix_spawnp()
| -rw-r--r-- | src/wrapped/wrappedlibc.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |