From abd389de79a2dcd5e139f2f52fba8b43c4ef42e9 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 19 Jun 2020 21:40:48 +0000 Subject: __ntapi_tt_fork_finalize(): update rtdata->cid_self, rtdata->cid_parent. --- src/process/ntapi_tt_fork.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/process/ntapi_tt_fork.c b/src/process/ntapi_tt_fork.c index 50ce484..5690164 100644 --- a/src/process/ntapi_tt_fork.c +++ b/src/process/ntapi_tt_fork.c @@ -27,6 +27,12 @@ static intptr_t __fastcall __ntapi_tt_fork_finalize(void ** hprocess) __internals = __ntapi_internals(); rtdata = __internals->rtdata; + rtdata->cid_parent.process_id = rtdata->cid_self.process_id; + rtdata->cid_parent.thread_id = rtdata->cid_self.thread_id; + + rtdata->cid_self.process_id = pe_get_current_process_id(); + rtdata->cid_self.thread_id = pe_get_current_thread_id(); + if ((status = __ntapi->zw_duplicate_object( __internals->hprocess, __internals->hprocess, -- cgit v1.2.3