Commit e4c25f2b authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Andrei Vagin

files: Close ctl tty via generic engine

Just mark the fle as "fake" and the engine will do all the work.
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 832c9aef
...@@ -854,7 +854,7 @@ int prepare_ctl_tty(int pid, struct rst_info *rst_info, u32 ctl_tty_id) ...@@ -854,7 +854,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->fd = reserve_service_fd(CTL_TTY_OFF);
e->type = FD_TYPES__TTY; e->type = FD_TYPES__TTY;
if (collect_fd(pid, e, rst_info, false)) { if (collect_fd(pid, e, rst_info, true)) {
xfree(e); xfree(e);
return -1; return -1;
} }
......
...@@ -733,7 +733,6 @@ out: ...@@ -733,7 +733,6 @@ out:
close(slave); close(slave);
err: err:
pty_free_fake_reg(&fake); pty_free_fake_reg(&fake);
close(fd);
return ret ? -1 : 0; return ret ? -1 : 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment