Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
3dfe6f8d
Unverified
Commit
3dfe6f8d
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_free()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
c1ee47cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
commands.c
src/lxc/commands.c
+2
-2
console.c
src/lxc/console.c
+1
-1
console.h
src/lxc/console.h
+2
-2
No files found.
src/lxc/commands.c
View file @
3dfe6f8d
...
...
@@ -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
));
if
(
ret
<
0
)
{
ERROR
(
"Failed to send tty to client"
);
lxc_
console
_free
(
handler
->
conf
,
fd
);
lxc_
terminal
_free
(
handler
->
conf
,
fd
);
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_list
*
cur
,
*
next
;
lxc_
console
_free
(
handler
->
conf
,
fd
);
lxc_
terminal
_free
(
handler
->
conf
,
fd
);
lxc_mainloop_del_handler
(
descr
,
fd
);
if
(
cmd
!=
LXC_CMD_ADD_STATE_CLIENT
)
{
close
(
fd
);
...
...
src/lxc/console.c
View file @
3dfe6f8d
...
...
@@ -617,7 +617,7 @@ out:
return
masterfd
;
}
void
lxc_
console
_free
(
struct
lxc_conf
*
conf
,
int
fd
)
void
lxc_
terminal
_free
(
struct
lxc_conf
*
conf
,
int
fd
)
{
int
i
;
struct
lxc_tty_info
*
tty_info
=
&
conf
->
tty_info
;
...
...
src/lxc/console.h
View file @
3dfe6f8d
...
...
@@ -101,7 +101,7 @@ extern int lxc_console_create(struct lxc_conf *);
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().
*
* @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
* 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment