summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-07-21 10:58:29 -0400
committermidipix <writeonce@midipix.org>2016-07-24 06:15:13 -0400
commitc26174a7fb2eb57dd26ac3dd31e987d5199e5bc7 (patch)
tree1a424ac8ff28237d75003ee9e241133c3c4ff387 /src
parente73fb6abab99e815e6b6d7f40907d532de16eaae (diff)
downloadptycon-c26174a7fb2eb57dd26ac3dd31e987d5199e5bc7.tar.bz2
ptycon-c26174a7fb2eb57dd26ac3dd31e987d5199e5bc7.tar.xz
struct ptyc_driver_ctx_impl: added a pointer to the process's runtime data.
Diffstat (limited to 'src')
-rw-r--r--src/driver/ptyc_driver_ctx.c5
-rw-r--r--src/internal/ptycon_driver_impl.h1
-rw-r--r--src/pty/ptyc_spawn.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/src/driver/ptyc_driver_ctx.c b/src/driver/ptyc_driver_ctx.c
index dfaa572..b7cdc88 100644
--- a/src/driver/ptyc_driver_ctx.c
+++ b/src/driver/ptyc_driver_ctx.c
@@ -141,6 +141,10 @@ static struct ptyc_driver_ctx_impl * ptyc_driver_ctx_alloc(
size_t size;
struct argv_entry * entry;
const char ** units;
+ nt_runtime_data * rtdata;
+
+ if (ntapi->tt_get_runtime_data(&rtdata,0))
+ return 0;
size = sizeof(struct ptyc_driver_ctx_alloc);
size += (nunits+1)*sizeof(const char *);
@@ -157,6 +161,7 @@ static struct ptyc_driver_ctx_impl * ptyc_driver_ctx_alloc(
ictx->meta = meta;
ictx->ctx.ctx.units = ictx->units;
+ ictx->ctx.rtdata = rtdata;
return &ictx->ctx;
}
diff --git a/src/internal/ptycon_driver_impl.h b/src/internal/ptycon_driver_impl.h
index 0acb69d..8386460 100644
--- a/src/internal/ptycon_driver_impl.h
+++ b/src/internal/ptycon_driver_impl.h
@@ -51,6 +51,7 @@ struct ptyc_client_ctx {
};
struct ptyc_driver_ctx_impl {
+ nt_rtdata * rtdata;
struct ptyc_client_ctx clctx;
struct ptyc_term_ctx tctx;
struct ptyc_loop_ctx lctx;
diff --git a/src/pty/ptyc_spawn.c b/src/pty/ptyc_spawn.c
index 93b8237..9ad8e9b 100644
--- a/src/pty/ptyc_spawn.c
+++ b/src/pty/ptyc_spawn.c
@@ -62,9 +62,7 @@ int __stdcall ptyc_spawn(struct ptyc_driver_ctx * dctx)
if (!dctx->cctx->eargv)
return NT_STATUS_SUCCESS;
- if ((status = ntapi->tt_get_runtime_data(&self,0)))
- return status;
-
+ self = ictx->rtdata;
clctx = &ictx->clctx;
/* hat */