terminal: close pty before opening it

There is no explicit call to reopen the underlying pty so we simply
force-close it before (re)-opening it. This will allow the UI to reopen a
pty when the child died.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-07-14 12:14:25 +02:00
parent fd85a7b2ce
commit 2af9952a72

View File

@ -377,6 +377,7 @@ int kmscon_terminal_open(struct kmscon_terminal *term,
if (!term)
return -EINVAL;
kmscon_pty_close(term->pty);
width = kmscon_console_get_width(term->console);
height = kmscon_console_get_height(term->console);
ret = kmscon_pty_open(term->pty, width, height);