summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
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 */