mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-09 01:50:35 +00:00
console: lxc_terminal_free()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
c1ee47cd79
commit
3dfe6f8dac
@ -757,7 +757,7 @@ static int lxc_cmd_console_callback(int fd, struct lxc_cmd_req *req,
|
|||||||
ret = lxc_abstract_unix_send_fds(fd, &masterfd, 1, &rsp, sizeof(rsp));
|
ret = lxc_abstract_unix_send_fds(fd, &masterfd, 1, &rsp, sizeof(rsp));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
ERROR("Failed to send tty to client");
|
ERROR("Failed to send tty to client");
|
||||||
lxc_console_free(handler->conf, fd);
|
lxc_terminal_free(handler->conf, fd);
|
||||||
goto out_close;
|
goto out_close;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1080,7 +1080,7 @@ static void lxc_cmd_fd_cleanup(int fd, struct lxc_handler *handler,
|
|||||||
struct lxc_state_client *client;
|
struct lxc_state_client *client;
|
||||||
struct lxc_list *cur, *next;
|
struct lxc_list *cur, *next;
|
||||||
|
|
||||||
lxc_console_free(handler->conf, fd);
|
lxc_terminal_free(handler->conf, fd);
|
||||||
lxc_mainloop_del_handler(descr, fd);
|
lxc_mainloop_del_handler(descr, fd);
|
||||||
if (cmd != LXC_CMD_ADD_STATE_CLIENT) {
|
if (cmd != LXC_CMD_ADD_STATE_CLIENT) {
|
||||||
close(fd);
|
close(fd);
|
||||||
|
@ -617,7 +617,7 @@ out:
|
|||||||
return masterfd;
|
return masterfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lxc_console_free(struct lxc_conf *conf, int fd)
|
void lxc_terminal_free(struct lxc_conf *conf, int fd)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct lxc_tty_info *tty_info = &conf->tty_info;
|
struct lxc_tty_info *tty_info = &conf->tty_info;
|
||||||
|
@ -101,7 +101,7 @@ extern int lxc_console_create(struct lxc_conf *);
|
|||||||
extern void lxc_console_delete(struct lxc_pty *);
|
extern void lxc_console_delete(struct lxc_pty *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* lxc_console_free: mark the console or a tty as unallocated, free any
|
* lxc_terminal_free: mark the console or a tty as unallocated, free any
|
||||||
* resources allocated by lxc_terminal_allocate().
|
* resources allocated by lxc_terminal_allocate().
|
||||||
*
|
*
|
||||||
* @conf : the configuration of the container whose tty was closed
|
* @conf : the configuration of the container whose tty was closed
|
||||||
@ -109,7 +109,7 @@ extern void lxc_console_delete(struct lxc_pty *);
|
|||||||
* the console or tty is no longer in use. this is used to match
|
* the console or tty is no longer in use. this is used to match
|
||||||
* which console/tty is being freed.
|
* which console/tty is being freed.
|
||||||
*/
|
*/
|
||||||
extern void lxc_console_free(struct lxc_conf *conf, int fd);
|
extern void lxc_terminal_free(struct lxc_conf *conf, int fd);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register pty event handlers in an open mainloop
|
* Register pty event handlers in an open mainloop
|
||||||
|
Loading…
Reference in New Issue
Block a user