summaryrefslogtreecommitdiffhomepage
path: root/src/process
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-11-26 07:38:36 +0000
committermidipix <writeonce@midipix.org>2017-12-06 18:03:11 -0500
commita1d104df30e96e89077102162395f72385ddc3e7 (patch)
tree95534ae3e424b9af417c62e2feff901ddc74ed97 /src/process
parentf6d035023659ace277b773635c496e83b55858d1 (diff)
downloadntapi-a1d104df30e96e89077102162395f72385ddc3e7.tar.bz2
ntapi-a1d104df30e96e89077102162395f72385ddc3e7.tar.xz
internal foreign process creation: set process and thread creation flags.
Diffstat (limited to 'src/process')
-rw-r--r--src/process/ntapi_tt_spawn_foreign_process.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/process/ntapi_tt_spawn_foreign_process.c b/src/process/ntapi_tt_spawn_foreign_process.c
index ea5f0cf..105b59b 100644
--- a/src/process/ntapi_tt_spawn_foreign_process.c
+++ b/src/process/ntapi_tt_spawn_foreign_process.c
@@ -361,6 +361,11 @@ int32_t __stdcall __ntapi_tt_spawn_foreign_process(nt_spawn_process_params * spa
cparams.cid.process_id = processinfo.process_id;
cparams.cid.thread_id = processinfo.thread_id;
} else {
+ cparams.creation_flags_thread = NT_PROCESS_CREATE_FLAGS_CREATE_THREAD_SUSPENDED;
+
+ if (finherit)
+ cparams.creation_flags_process |= NT_PROCESS_CREATE_FLAGS_INHERIT_HANDLES;
+
if ((status = __ntapi->tt_create_native_process(&cparams)))
return __tt_spawn_return(
&rtblock,0,0,status);