summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/ptycon/ptycon.h4
-rw-r--r--src/driver/ptyc_amain.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/include/ptycon/ptycon.h b/include/ptycon/ptycon.h
index 19c2513..d8f2275 100644
--- a/include/ptycon/ptycon.h
+++ b/include/ptycon/ptycon.h
@@ -48,6 +48,10 @@ extern "C" {
#define PTYC_DRIVER_DAEMON_ALWAYS 0x1000
#define PTYC_DRIVER_DAEMON_NEVER 0x2000
+#define PTYC_DRIVER_DBG_MODE (PTYC_DRIVER_DBG_EVENT \
+ | PTYC_DRIVER_DBG_OVEN \
+ | PTYC_DRIVER_DBG_RAW)
+
struct ptyc_source_version {
int major;
int minor;
diff --git a/src/driver/ptyc_amain.c b/src/driver/ptyc_amain.c
index ecdc651..a257bf7 100644
--- a/src/driver/ptyc_amain.c
+++ b/src/driver/ptyc_amain.c
@@ -70,6 +70,10 @@ int ptyc_main(int argc, char ** argv, char ** envp)
if ((ptyc_version(dctx)) < 0)
return ptyc_exit(dctx,2);
+ if (!dctx->cctx->eargv)
+ if (!(dctx->cctx->drvflags & PTYC_DRIVER_DBG_MODE))
+ return ptyc_exit(dctx,0);
+
if (ptyc_alloc_pty(dctx))
return ptyc_exit(dctx,2);