summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 0c82db1..93363e2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -191,6 +191,18 @@ on_hide_splash (state_t *state)
ply_window_free (state->window);
state->window = NULL;
}
+
+ if (state->session != NULL)
+ {
+ ply_trace ("unredirecting console");
+ int fd;
+
+ fd = open ("/dev/console", O_RDWR | O_NOCTTY);
+ if (fd >= 0)
+ ioctl (fd, TIOCCONS);
+
+ close (fd);
+ }
}
static void