files: Close ctl tty via generic engine

Just mark the fle as "fake" and the engine will do all the work.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
This commit is contained in:
Kirill Tkhai 2017-12-28 16:08:55 +03:00 committed by Andrei Vagin
parent b1a67f8572
commit 56cd4b53c2
2 changed files with 1 additions and 2 deletions

View file

@ -903,7 +903,7 @@ int prepare_ctl_tty(int pid, struct rst_info *rst_info, u32 ctl_tty_id)
e->fd = reserve_service_fd(CTL_TTY_OFF);
e->type = FD_TYPES__TTY;
if (collect_fd(pid, e, rst_info, false)) {
if (collect_fd(pid, e, rst_info, true)) {
xfree(e);
return -1;
}

View file

@ -733,7 +733,6 @@ out:
close(slave);
err:
pty_free_fake_reg(&fake);
close(fd);
return ret ? -1 : 0;
}