uterm: vt: fix resetting access control on VT-close
This is a weird fix. One would think that this is automatically reset when calling close() on the fd but, suprise, it's not. So lets reset this manually, otherwise when we close the VT but our application is still active, the user will never be able to leave the VT again. Again a hilarious example why the VT API sucks. Really... Get rid of it. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
06d33f6636
commit
5dfc12ee6a
@ -287,7 +287,14 @@ err_fd:
|
||||
|
||||
static void real_close(struct uterm_vt *vt)
|
||||
{
|
||||
struct vt_mode mode;
|
||||
|
||||
log_debug("closing vt %p", vt);
|
||||
|
||||
memset(&mode, 0, sizeof(mode));
|
||||
mode.mode = VT_AUTO;
|
||||
ioctl(vt->real_fd, VT_SETMODE, &mode);
|
||||
|
||||
ioctl(vt->real_fd, KDSETMODE, KD_TEXT);
|
||||
tcsetattr(vt->real_fd, TCSANOW, &vt->real_saved_attribs);
|
||||
ev_eloop_rm_fd(vt->real_efd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user