summaryrefslogtreecommitdiff
path: root/Presence
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2013-06-21 15:41:34 -0400
committerjoe <joe@jerkface.net>2013-06-21 15:41:34 -0400
commit7bb61539e0db00f91a2c5bc3740492ef9319c17b (patch)
tree24cb6cfc360753ab6fd225ac67eac233ff0b4cd5 /Presence
parenta232d399a0aa55a31ccb05209a27b498c77fe8dd (diff)
VTHACK optional, causes logout bug with gnome2/debian-old-stable
Diffstat (limited to 'Presence')
-rw-r--r--Presence/monitortty.c6
1 files changed, 5 insertions, 1 deletions
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() {
159 active = get_active(tty); 159 active = get_active(tty);
160 fd = tty; 160 fd = tty;
161 pthread_mutex_unlock(&mu); 161 pthread_mutex_unlock(&mu);
162 // pthread_cancel(mt); 162#ifndef VTHACK
163 pthread_cancel(mt);
164#endif
163 char cmd[40]; cmd[39] = '\0'; 165 char cmd[40]; cmd[39] = '\0';
164 // Hack to wake up from VT_WAITEVENT ioctl 166 // Hack to wake up from VT_WAITEVENT ioctl
167#ifdef VTHACK
165 snprintf(cmd,39,"chvt %i;chvt %i",active+1,active); 168 snprintf(cmd,39,"chvt %i;chvt %i",active+1,active);
166 system(cmd); 169 system(cmd);
167 pthread_join(mt,NULL); 170 pthread_join(mt,NULL);
171#endif
168 close(fd); 172 close(fd);
169} 173}