From c34b2cb9027b8d9dfb127241a9634b7b47a84186 Mon Sep 17 00:00:00 2001 From: midipix Date: Jul 20 2016 09:27:39 +0000 Subject: tty session information: support free-standing session spawning. With matching support in the tty/pty server, passing the syspid of a child process should allow for child session initialization from within a multi-threaded parent as part of a fork-less, native process creation. --- diff --git a/include/ntapi/nt_tty.h b/include/ntapi/nt_tty.h index d8e2fc6..16fd43b 100644 --- a/include/ntapi/nt_tty.h +++ b/include/ntapi/nt_tty.h @@ -218,7 +218,7 @@ typedef struct __attr_ptr_size_aligned__ _nt_tty_session_info { int32_t pid; int32_t pgid; int32_t sid; - int32_t reserved; + int32_t syspid; } nt_tty_session_info; typedef struct __attr_ptr_size_aligned__ _nt_tty_register_msg { diff --git a/src/tty/ntapi_tty_client_session_query.c b/src/tty/ntapi_tty_client_session_query.c index a57a1ee..bb2c550 100644 --- a/src/tty/ntapi_tty_client_session_query.c +++ b/src/tty/ntapi_tty_client_session_query.c @@ -34,7 +34,7 @@ int32_t __stdcall __ntapi_tty_client_session_query( sessioninfo->pid = msg.data.sessioninfo.pid; sessioninfo->pgid = msg.data.sessioninfo.pgid; sessioninfo->sid = msg.data.sessioninfo.sid; - sessioninfo->reserved = msg.data.sessioninfo.reserved; + sessioninfo->syspid = msg.data.sessioninfo.syspid; return NT_STATUS_SUCCESS; } diff --git a/src/tty/ntapi_tty_client_session_set.c b/src/tty/ntapi_tty_client_session_set.c index f929517..13667fd 100644 --- a/src/tty/ntapi_tty_client_session_set.c +++ b/src/tty/ntapi_tty_client_session_set.c @@ -29,7 +29,7 @@ int32_t __stdcall __ntapi_tty_client_session_set( msg.data.sessioninfo.pid = sessioninfo->pid; msg.data.sessioninfo.pgid = sessioninfo->pgid; msg.data.sessioninfo.sid = sessioninfo->sid; - msg.data.sessioninfo.reserved = sessioninfo->reserved; + msg.data.sessioninfo.syspid = sessioninfo->syspid; if ((status = __ntapi->zw_request_wait_reply_port(hport,&msg,&msg))) return status;