summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-07-20 05:21:57 -0400
committermidipix <writeonce@midipix.org>2016-07-20 05:27:39 -0400
commitc34b2cb9027b8d9dfb127241a9634b7b47a84186 (patch)
tree11fd207680db82dde5712194aac2f53709446b4b
parent862d11239a7b649b53f099f107b67a656b3cd9e7 (diff)
downloadntapi-c34b2cb9027b8d9dfb127241a9634b7b47a84186.tar.bz2
ntapi-c34b2cb9027b8d9dfb127241a9634b7b47a84186.tar.xz
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.
-rw-r--r--include/ntapi/nt_tty.h2
-rw-r--r--src/tty/ntapi_tty_client_session_query.c2
-rw-r--r--src/tty/ntapi_tty_client_session_set.c2
3 files changed, 3 insertions, 3 deletions
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;