summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ptycon.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ptycon.c b/src/ptycon.c
index 18cba4e..5c8fe76 100644
--- a/src/ptycon.c
+++ b/src/ptycon.c
@@ -10,6 +10,8 @@
#include "ptycon_init_impl.h"
#include "ptycon_driver_impl.h"
+static const nt_guid ptycon_daemon_guid = PTYC_PORT_GUID_DAEMON;
+
static const nt_tty_affiliation tty_affiliation
__attr_section__(".midipix")
= NT_TTY_AFFILIATION_DEFAULT;
@@ -60,6 +62,14 @@ static int32_t ptycon_start(int argc, char ** argv, char ** envp)
/* early debug (optional) */
ptycon_dbg_init(argv);
+ /* daemon */
+ if (!(ntapi->tt_guid_compare(
+ &rtdata->srv_guid,
+ &(nt_guid)NT_PORT_GUID_DEFAULT)))
+ ntapi->tt_guid_copy(
+ &rtdata->srv_guid,
+ &ptycon_daemon_guid);
+
/* no tty session? */
if (!rtdata->srv_keys[0])
return ptyc_main(argc,argv,envp);