summaryrefslogtreecommitdiffhomepage
path: root/src/process/ntapi_tt_create_native_process_v2.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-01-06 09:44:17 -0500
committermidipix <writeonce@midipix.org>2017-01-07 09:02:24 -0500
commitf154f6e8506ce6cd5bab49a143804b80ac9eaff9 (patch)
tree729a4f35a5d0d982060907eac791029ee0cec5d0 /src/process/ntapi_tt_create_native_process_v2.c
parent3a85e17c465838aecef252d2929afe6921b787fe (diff)
downloadntapi-f154f6e8506ce6cd5bab49a143804b80ac9eaff9.tar.bz2
ntapi-f154f6e8506ce6cd5bab49a143804b80ac9eaff9.tar.xz
native process creation: added child process session registration support.
Diffstat (limited to 'src/process/ntapi_tt_create_native_process_v2.c')
-rw-r--r--src/process/ntapi_tt_create_native_process_v2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/process/ntapi_tt_create_native_process_v2.c b/src/process/ntapi_tt_create_native_process_v2.c
index f28a522..f20c51f 100644
--- a/src/process/ntapi_tt_create_native_process_v2.c
+++ b/src/process/ntapi_tt_create_native_process_v2.c
@@ -211,6 +211,14 @@ int32_t __stdcall __ntapi_tt_create_native_process_v2(
params->create_process_ext_params)))
return status;
+ /* session registration */
+ if (params->hsession && (params->hsession != NT_INVALID_HANDLE_VALUE))
+ if ((status = __ntapi->tty_client_process_register(
+ params->hsession,
+ params->pbi.unique_process_id,
+ 0,0,0)))
+ return __tt_create_process_cancel(params,status);
+
/* tidy up */
__ntapi->zw_close(params->create_process_info->success_state.hfile);
__ntapi->zw_close(params->create_process_info->success_state.hsection);