[Mit-cadr-cvs] r396 - branches/ggilley/emulator/usim
ggilley at common-lisp.net
ggilley at common-lisp.net
Wed Dec 5 21:20:25 UTC 2012
Author: ggilley
Date: Wed Dec 5 13:20:24 2012
New Revision: 396
Log:
quit when viewing was getting hung again
Modified:
branches/ggilley/emulator/usim/Files.c
Modified: branches/ggilley/emulator/usim/Files.c
==============================================================================
--- branches/ggilley/emulator/usim/Files.c Wed Dec 5 08:20:50 2012 (r395)
+++ branches/ggilley/emulator/usim/Files.c Wed Dec 5 13:20:24 2012 (r396)
@@ -2480,6 +2480,12 @@
} else {
xqueue(t, x);
// (*t->t_command->c_func)(x, t);
+
+ // we may have a packet stuck waiting to transmit
+ // force the transmit window to close and tickle the connection
+ if ((t->t_command->c_func == fileclose || t->t_command->c_func == filepos) && x->x_options & O_READ)
+ chaos_interrupt_connection(x->x_fh->f_connection);
+
#if defined(OSX)
dispatch_semaphore_signal(x->x_hangsem);
#else
@@ -2591,17 +2597,12 @@
(void)signal(SIGHUP, SIG_IGN);
#endif
- // we may have a packet stuck waiting to transmit
- // force the transmit window to close and tickle the connection
- if (x->x_options & O_READ)
- chaos_interrupt_connection(x->x_fh->f_connection);
-
#if defined(OSX)
- dispatch_semaphore_signal(x->x_hangsem);
+ dispatch_semaphore_signal(x->x_hangsem);
#else
- pthread_mutex_lock(&x->x_hangsem);
- pthread_cond_signal(&x->x_hangcond);
- pthread_mutex_unlock(&x->x_hangsem);
+ pthread_mutex_lock(&x->x_hangsem);
+ pthread_cond_signal(&x->x_hangcond);
+ pthread_mutex_unlock(&x->x_hangsem);
#endif
}
More information about the mit-cadr-cvs
mailing list