summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-08-06 16:09:46 -0400
committermidipix <writeonce@midipix.org>2016-08-10 21:47:24 -0400
commit6494811a247d5c11587c44027a103b41676554c3 (patch)
tree935c75a0a84eae93813e8b03f17765991f85482e /src
parent8b4ec54240064e7e4e21c720b294ebbcba2c31c8 (diff)
downloadptycon-6494811a247d5c11587c44027a103b41676554c3.tar.bz2
ptycon-6494811a247d5c11587c44027a103b41676554c3.tar.xz
ptyc_spawn(): pass a inherited sysroot handle to the child process as needed.
Diffstat (limited to 'src')
-rw-r--r--src/pty/ptyc_spawn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pty/ptyc_spawn.c b/src/pty/ptyc_spawn.c
index 94e56b3..f4f026b 100644
--- a/src/pty/ptyc_spawn.c
+++ b/src/pty/ptyc_spawn.c
@@ -54,8 +54,10 @@ int __stdcall ptyc_spawn(struct ptyc_driver_ctx * dctx)
(uintptr_t *)&self->cid_self,
sizeof(nt_cid));
- rtctx.hroot = dctx->cctx->hroot;
rtctx.hcwd = self->hcwd;
+ rtctx.hroot = dctx->cctx->hroot
+ ? dctx->cctx->hroot
+ : self->hroot;
rtctx.srv_keys[0] = self->srv_keys[0];
rtctx.srv_keys[1] = self->srv_keys[1];