From 2af9952a7236868fa8bcd9f2d7a3940f4f56dbb7 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sat, 14 Jul 2012 12:14:25 +0200 Subject: [PATCH] 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 --- src/terminal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/terminal.c b/src/terminal.c index 261e993..f87bfeb 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -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);