handle_terminal_vt_switches (GdmSessionWorker *worker,
                             int               tty_fd)
{
        struct vt_mode setmode_request = { 0 };
        gboolean succeeded = TRUE;

        setmode_request.mode = VT_PROCESS;
        setmode_request.relsig = RELEASE_DISPLAY_SIGNAL;
        setmode_request.acqsig = ACQUIRE_DISPLAY_SIGNAL;

        if (ioctl (tty_fd, VT_SETMODE, &setmode_request) < 0) {
                g_debug ("GdmSessionWorker: couldn't manage VTs manually: %m");
                succeeded = FALSE;
        }

        signal (RELEASE_DISPLAY_SIGNAL, on_release_display);
        signal (ACQUIRE_DISPLAY_SIGNAL, on_acquire_display);

        return succeeded;
}
handle_terminal_vt_switches (GdmSessionWorker *worker,
                             int               tty_fd)
{
        struct vt_mode setmode_request = { 0 };
        gboolean succeeded = TRUE;

        setmode_request.mode = VT_PROCESS;
        setmode_request.relsig = RELEASE_DISPLAY_SIGNAL;
        setmode_request.acqsig = ACQUIRE_DISPLAY_SIGNAL;

        if (ioctl (tty_fd, VT_SETMODE, &setmode_request) < 0) {
                g_debug ("GdmSessionWorker: couldn't manage VTs manually: %m");
                succeeded = FALSE;
        }

        signal (RELEASE_DISPLAY_SIGNAL, on_release_display);
        signal (ACQUIRE_DISPLAY_SIGNAL, on_acquire_display);

        return succeeded;
}