* tty.cc (tty_list::terminate): Guard releasing the tty with tty_mutex.
(tty::init): Set master_pid to 0.
This commit is contained in:
parent
988566db0c
commit
dad3ae73b3
@ -1,3 +1,8 @@
|
|||||||
|
2004-12-14 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* tty.cc (tty_list::terminate): Guard releasing the tty with tty_mutex.
|
||||||
|
(tty::init): Set master_pid to 0.
|
||||||
|
|
||||||
2004-12-14 Thomas Wolff <towo@computer.org>
|
2004-12-14 Thomas Wolff <towo@computer.org>
|
||||||
|
|
||||||
* fhandler_console.cc (read): Consider offset within scrolling
|
* fhandler_console.cc (read): Consider offset within scrolling
|
||||||
|
@ -151,6 +151,9 @@ tty_list::terminate (void)
|
|||||||
low_priority_sleep (200);
|
low_priority_sleep (200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (WaitForSingleObject (tty_mutex, INFINITE) == WAIT_FAILED)
|
||||||
|
termios_printf ("WFSO for tty_mutex %p failed, %E", tty_mutex);
|
||||||
|
|
||||||
termios_printf ("tty %d master about to finish", ttynum);
|
termios_printf ("tty %d master about to finish", ttynum);
|
||||||
ForceCloseHandle1 (t->to_slave, to_pty);
|
ForceCloseHandle1 (t->to_slave, to_pty);
|
||||||
ForceCloseHandle1 (t->from_slave, from_pty);
|
ForceCloseHandle1 (t->from_slave, from_pty);
|
||||||
@ -160,6 +163,8 @@ tty_list::terminate (void)
|
|||||||
char buf[20];
|
char buf[20];
|
||||||
__small_sprintf (buf, "tty%d", ttynum);
|
__small_sprintf (buf, "tty%d", ttynum);
|
||||||
logout (buf);
|
logout (buf);
|
||||||
|
|
||||||
|
ReleaseMutex (tty_mutex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,6 +374,7 @@ tty::init (void)
|
|||||||
to_slave = NULL;
|
to_slave = NULL;
|
||||||
from_slave = NULL;
|
from_slave = NULL;
|
||||||
was_opened = 0;
|
was_opened = 0;
|
||||||
|
master_pid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
HANDLE
|
HANDLE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user