diff options
Diffstat (limited to 'Presence/monitortty.c')
-rw-r--r-- | Presence/monitortty.c | 6 |
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 | } |