summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-02-27 12:24:21 -0500
committerRay Strode <rstrode@redhat.com>2015-02-27 12:28:47 -0500
commit04c0d76f70719dc16b32efdb5c677255fe7467bf (patch)
tree135d77403059b18702059e3463b016d315fbd649
parent8a16520fced1633e1408a467162f4ceddaa6371c (diff)
downloadgdm-04c0d76f70719dc16b32efdb5c677255fe7467bf.tar.gz
worker: add some debug messages
This will make it clear what VT we're on, and whether or not the session has control of the tty..
-rw-r--r--daemon/gdm-session-worker.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 470428ba..90c9245a 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -989,17 +989,23 @@ jump_to_vt (GdmSessionWorker *worker,
int fd;
gboolean just_opened_tty = FALSE;
+ g_debug ("GdmSessionWorker: jumping to VT %d", vt_number);
if (worker->priv->session_tty_fd != -1) {
struct vt_mode setmode_request = { 0 };
fd = worker->priv->session_tty_fd;
- ioctl (fd, KDSETMODE, KD_GRAPHICS);
+ g_debug ("GdmSessionWorker: first setting graphics mode to prevent flicker");
+ if (ioctl (fd, KDSETMODE, KD_GRAPHICS) < 0) {
+ g_debug ("GdmSessionWorker: couldn't set graphics mode: %m");
+ }
setmode_request.mode = VT_PROCESS;
setmode_request.relsig = RELEASE_DISPLAY_SIGNAL;
setmode_request.acqsig = ACQUIRE_DISPLAY_SIGNAL;
- ioctl (fd, VT_SETMODE, &setmode_request);
+ if (ioctl (fd, VT_SETMODE, &setmode_request) < 0) {
+ g_debug ("GdmSessionWorker: couldn't manage VTs manually: %m");
+ }
signal (RELEASE_DISPLAY_SIGNAL, on_release_display);
signal (ACQUIRE_DISPLAY_SIGNAL, on_acquire_display);
@@ -1929,7 +1935,9 @@ gdm_session_worker_start_session (GdmSessionWorker *worker,
/* Take control of the tty
*/
if (needs_controlling_terminal) {
- ioctl (STDIN_FILENO, TIOCSCTTY, 0);
+ if (ioctl (STDIN_FILENO, TIOCSCTTY, 0) < 0) {
+ g_debug ("GdmSessionWorker: could not take control of tty: %m");
+ }
}
#endif