#include <grp.h>
#include <stdio.h>
#include <signal.h>
-#include <errno.h>
#include <termios.h>
#include <libintl.h>
#include <sys/types.h>
#include <ctype.h>
#include <sys/socket.h>
#include <netdb.h>
+#include <linux/kd.h>
#include <glib.h>
#include <glib/gstdio.h>
#define TLM_SESSION_PRIV(obj) \
G_TYPE_INSTANCE_GET_PRIVATE ((obj), TLM_TYPE_SESSION, TlmSessionPrivate)
+#ifndef KDSKBMUTE
+#define KDSKBMUTE 0x4B51
+#endif
+
enum {
PROP_0,
PROP_CONFIG,
if (ioctl (tty_fd, TIOCSPGRP, &tty_pgid)) {
WARN ("ioctl(TIOCSPGRP) failed: %s", strerror(errno));
}
+
+ /* TODO: unset the mode on session cleanup */
+ if (ioctl(tty_fd, KDSKBMUTE, 1) &&
+ ioctl(tty_fd, KDSKBMODE, K_OFF)) {
+ WARN ("ioctl(KDSKBMODE) failed: %s", strerror(errno));
+ }
+
/*if (tcsetpgrp (tty_fd, getpgrp ()))
WARN ("tcsetpgrp() failed: %s", strerror(errno));*/
/* ==================================
* this is child process here onwards
* ================================== */
-
gint open_max;
gint fd;
args[1] = g_strdup ("--user");
}
- if (signal (SIGINT, SIG_DFL) == SIG_ERR)
- WARN ("failed reset SIGINT: %s", strerror(errno));
-
DBG ("executing: ");
args_iter = args;
while (args_iter && *args_iter) {