diff options
-rw-r--r-- | src/daemon.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/daemon.cpp b/src/daemon.cpp index c0e764e..fbd03d8 100644 --- a/src/daemon.cpp +++ b/src/daemon.cpp @@ -506,6 +506,27 @@ bool Daemon::check_agent(int &streamfd) } syslog(LOG_DEBUG, "trace %d", __LINE__); + +#if 0 + // TODO check that tty we are going to use is still a graphic + // terminal + int arg; + + /* To be used as the fd in ioctl(). */ + if ((fd = open("/dev/console", O_NOCTTY)) == ERROR) { + perror("open"); + exit(ERROR); + } + + printf("w00w00!\n\n"); + + if ((ioctl(fd, KDGETMODE, &arg)) == ERROR) { + perror("ioctl"); + close(fd); + exit(ERROR); + } +#endif + // can we handle a new TTY ? if (terminal_info.find(current_tty) == terminal_info.end()) { return false; |