From 7bb61539e0db00f91a2c5bc3740492ef9319c17b Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 21 Jun 2013 15:41:34 -0400 Subject: VTHACK optional, causes logout bug with gnome2/debian-old-stable --- Presence/monitortty.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Presence') diff --git a/Presence/monitortty.c b/Presence/monitortty.c index 675abe5c..a9a095cf 100644 --- a/Presence/monitortty.c +++ b/Presence/monitortty.c @@ -159,11 +159,15 @@ void closeTTY() { active = get_active(tty); fd = tty; pthread_mutex_unlock(&mu); - // pthread_cancel(mt); +#ifndef VTHACK + pthread_cancel(mt); +#endif char cmd[40]; cmd[39] = '\0'; // Hack to wake up from VT_WAITEVENT ioctl +#ifdef VTHACK snprintf(cmd,39,"chvt %i;chvt %i",active+1,active); system(cmd); pthread_join(mt,NULL); +#endif close(fd); } -- cgit v1.2.3