summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-07-14 22:23:51 -0400
committermidipix <writeonce@midipix.org>2016-07-21 03:47:28 -0400
commitf23497da9ffe02a44b9896aa5f6a5fd029939fd8 (patch)
tree27929fa115af3a8bc34550ae3725e45ed9936c8c
parentc56314da65f027f87f706fcd3af9021851f042a5 (diff)
downloadptycon-f23497da9ffe02a44b9896aa5f6a5fd029939fd8.tar.bz2
ptycon-f23497da9ffe02a44b9896aa5f6a5fd029939fd8.tar.xz
driver: added daemon initialization bits.
-rw-r--r--src/driver/ptyc_driver_ctx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/driver/ptyc_driver_ctx.c b/src/driver/ptyc_driver_ctx.c
index 4129cf5..ab4cbdb 100644
--- a/src/driver/ptyc_driver_ctx.c
+++ b/src/driver/ptyc_driver_ctx.c
@@ -18,6 +18,7 @@
#define ARGV_DRIVER
#include "ptycon_version.h"
+#include "ptycon_daemon_impl.h"
#include "ptycon_driver_impl.h"
#include "argv/argv.h"
@@ -32,6 +33,9 @@ const ntcon_vtbl * const ptyc_ntcon = &ptyc_ntcon_vtbl;
static gdi_vtbl ptyc_gdi_vtbl;
const gdi_vtbl * const ptyc_gdi = &ptyc_gdi_vtbl;
+/* daemon */
+static struct ptyc_daemon_ctx ptyc_daemon_ctx;
+
/* package info */
static const struct ptyc_source_version ptyc_src_version = {
PTYC_TAG_VER_MAJOR,
@@ -245,6 +249,9 @@ int ptyc_get_driver_ctx(
if (!(ctx = ptyc_driver_ctx_alloc(meta,&cctx,nunits)))
return ptyc_get_driver_ctx_fail(meta);
+ if (ptyc_daemon_init(&ptyc_daemon_ctx,cctx.drvflags))
+ return ptyc_get_driver_ctx_fail(meta);
+
ctx->ctx.program = program;
ctx->ctx.cctx = &ctx->cctx;