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
a8867251
Unverified
Commit
a8867251
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_signal_fini()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
dc8c7883
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
console.c
src/lxc/console.c
+4
-4
console.h
src/lxc/console.h
+2
-2
No files found.
src/lxc/console.c
View file @
a8867251
...
@@ -189,7 +189,7 @@ on_error:
...
@@ -189,7 +189,7 @@ on_error:
return
ts
;
return
ts
;
}
}
void
lxc_
console
_signal_fini
(
struct
lxc_tty_state
*
ts
)
void
lxc_
terminal
_signal_fini
(
struct
lxc_tty_state
*
ts
)
{
{
if
(
ts
->
sigfd
>=
0
)
{
if
(
ts
->
sigfd
>=
0
)
{
close
(
ts
->
sigfd
);
close
(
ts
->
sigfd
);
...
@@ -364,7 +364,7 @@ int lxc_console_cb_con(int fd, uint32_t events, void *data,
...
@@ -364,7 +364,7 @@ int lxc_console_cb_con(int fd, uint32_t events, void *data,
console
->
master
=
-
EBADF
;
console
->
master
=
-
EBADF
;
}
else
if
(
fd
==
console
->
peer
)
{
}
else
if
(
fd
==
console
->
peer
)
{
if
(
console
->
tty_state
)
{
if
(
console
->
tty_state
)
{
lxc_
console
_signal_fini
(
console
->
tty_state
);
lxc_
terminal
_signal_fini
(
console
->
tty_state
);
console
->
tty_state
=
NULL
;
console
->
tty_state
=
NULL
;
}
}
console
->
peer
=
-
EBADF
;
console
->
peer
=
-
EBADF
;
...
@@ -512,7 +512,7 @@ int lxc_setup_tios(int fd, struct termios *oldtios)
...
@@ -512,7 +512,7 @@ int lxc_setup_tios(int fd, struct termios *oldtios)
static
void
lxc_console_peer_proxy_free
(
struct
lxc_pty
*
console
)
static
void
lxc_console_peer_proxy_free
(
struct
lxc_pty
*
console
)
{
{
if
(
console
->
tty_state
)
{
if
(
console
->
tty_state
)
{
lxc_
console
_signal_fini
(
console
->
tty_state
);
lxc_
terminal
_signal_fini
(
console
->
tty_state
);
console
->
tty_state
=
NULL
;
console
->
tty_state
=
NULL
;
}
}
close
(
console
->
peerpty
.
master
);
close
(
console
->
peerpty
.
master
);
...
@@ -1092,7 +1092,7 @@ close_mainloop:
...
@@ -1092,7 +1092,7 @@ close_mainloop:
lxc_mainloop_close
(
&
descr
);
lxc_mainloop_close
(
&
descr
);
sigwinch_fini
:
sigwinch_fini
:
lxc_
console
_signal_fini
(
ts
);
lxc_
terminal
_signal_fini
(
ts
);
close_fds
:
close_fds
:
close
(
masterfd
);
close
(
masterfd
);
...
...
src/lxc/console.h
View file @
a8867251
...
@@ -215,7 +215,7 @@ extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
...
@@ -215,7 +215,7 @@ extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
struct
lxc_epoll_descr
*
descr
);
struct
lxc_epoll_descr
*
descr
);
/*
/*
* lxc_
console
_signal_fini: uninstall signal handler
* lxc_
terminal
_signal_fini: uninstall signal handler
*
*
* @ts : the lxc_tty_state returned by lxc_terminal_signal_init
* @ts : the lxc_tty_state returned by lxc_terminal_signal_init
*
*
...
@@ -225,7 +225,7 @@ extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
...
@@ -225,7 +225,7 @@ extern int lxc_terminal_signalfd_cb(int fd, uint32_t events, void *cbdata,
* Must be called with process_lock held to protect the lxc_ttys list, or
* Must be called with process_lock held to protect the lxc_ttys list, or
* from a non-threaded context.
* from a non-threaded context.
*/
*/
extern
void
lxc_
console
_signal_fini
(
struct
lxc_tty_state
*
ts
);
extern
void
lxc_
terminal
_signal_fini
(
struct
lxc_tty_state
*
ts
);
extern
int
lxc_console_write_ringbuffer
(
struct
lxc_pty
*
console
);
extern
int
lxc_console_write_ringbuffer
(
struct
lxc_pty
*
console
);
extern
int
lxc_console_create_log_file
(
struct
lxc_pty
*
console
);
extern
int
lxc_console_create_log_file
(
struct
lxc_pty
*
console
);
...
...
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