summaryrefslogtreecommitdiffhomepage
path: root/src/process/ntapi_tt_fork_v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process/ntapi_tt_fork_v2.c')
-rw-r--r--src/process/ntapi_tt_fork_v2.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/process/ntapi_tt_fork_v2.c b/src/process/ntapi_tt_fork_v2.c
index 233362c..7c47696 100644
--- a/src/process/ntapi_tt_fork_v2.c
+++ b/src/process/ntapi_tt_fork_v2.c
@@ -126,16 +126,17 @@ intptr_t __fastcall __ntapi_tt_fork_v2(
intptr_t pid;
nt_large_integer timeout;
void ** hport_session;
- void * hevent_tty_connected;
+ void * htty_connected;
ntapi_internals * __internals;
__internals = __ntapi_internals();
hport_session = &__internals->hport_tty_session;
timeout.quad = (-1) * 10 * 1000 * __NT_FORK_CHILD_WAIT_MILLISEC;
+ htty_connected = 0;
if (hport_session && *hport_session)
if (__ntapi_tt_create_inheritable_event(
- &hevent_tty_connected,
+ &htty_connected,
NT_NOTIFICATION_EVENT,
NT_EVENT_NOT_SIGNALED))
return (intptr_t)(-1);
@@ -160,24 +161,24 @@ intptr_t __fastcall __ntapi_tt_fork_v2(
__internals->rtdata->hsession = *hport_session;
__ntapi->zw_set_event(
- hevent_tty_connected,
+ htty_connected,
0);
} else {
status = __ntapi->zw_wait_for_single_object(
- hevent_tty_connected,
+ htty_connected,
NT_SYNC_NON_ALERTABLE,
&timeout);
if (status && __PSX_DEBUG)
if ((status = __ntapi->zw_wait_for_single_object(
- hevent_tty_connected,
+ htty_connected,
NT_SYNC_NON_ALERTABLE,
0)))
pid = __tt_fork_cancel(*hprocess,status);
}
- __ntapi->zw_close(hevent_tty_connected);
+ __ntapi->zw_close(htty_connected);
return pid;
}