summaryrefslogtreecommitdiffhomepage
path: root/src/process
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2023-01-12 20:34:51 +0000
committermidipix <writeonce@midipix.org>2023-01-13 08:25:24 +0000
commitf2efc567eb79aee9cb311e25e3ddf78ce51946a4 (patch)
treeb34bbf051137fd6f0d7876e3e92a0207b68d5493 /src/process
parent4cd40123d8217d20824a4323aab56eaae27a373b (diff)
downloadntapi-f2efc567eb79aee9cb311e25e3ddf78ce51946a4.tar.bz2
ntapi-f2efc567eb79aee9cb311e25e3ddf78ce51946a4.tar.xz
__ntapi_tt_spawn_native_process(): export the posix env to the native layer.
Diffstat (limited to 'src/process')
-rw-r--r--src/process/ntapi_tt_spawn_native_process.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/process/ntapi_tt_spawn_native_process.c b/src/process/ntapi_tt_spawn_native_process.c
index c2173ac..8e0623a 100644
--- a/src/process/ntapi_tt_spawn_native_process.c
+++ b/src/process/ntapi_tt_spawn_native_process.c
@@ -67,6 +67,7 @@ int32_t __stdcall __ntapi_tt_spawn_native_process(nt_spawn_process_params * spar
char ** rargv;
char ** renvp;
wchar16_t ** pwarg;
+ wchar16_t * wenv;
wchar16_t * wch;
void * hchild[2];
wchar16_t * imgbuf;
@@ -225,6 +226,7 @@ int32_t __stdcall __ntapi_tt_spawn_native_process(nt_spawn_process_params * spar
rdata->wargv -= (uintptr_t)rtblock.addr / sizeof(wchar16_t *);
rdata->wenvp -= (uintptr_t)rtblock.addr / sizeof(wchar16_t *);
+ wenv = wch;
wch += written/sizeof(wchar16_t);
buflen -= written;
@@ -275,6 +277,7 @@ int32_t __stdcall __ntapi_tt_spawn_native_process(nt_spawn_process_params * spar
cparams.image_name = imgname->buffer;
cparams.creation_flags_process = NT_PROCESS_CREATE_FLAGS_INHERIT_HANDLES;
cparams.creation_flags_thread = NT_PROCESS_CREATE_FLAGS_CREATE_THREAD_SUSPENDED;
+ cparams.environment = wenv;
crtblock.size = (size_t)wch - (size_t)rdata;
crtblock.size += 0xFFFF;