diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2018-02-15 05:52:25 +0000 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2018-07-03 11:12:24 +0100 |
commit | bf82172ce4d5b8e0e718d145eedca2e72979f32c (patch) | |
tree | bd2252fb2889c244d0ac8afaac6f9ad799dedc5e | |
parent | e000d30ed9e0287d2a1c7ba78de781ff1674233a (diff) |
WIP state
-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; |