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
dad4a039
Unverified
Commit
dad4a039
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_sigwinch()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
7a10164a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
commands.c
src/lxc/commands.c
+1
-1
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 @
dad4a039
...
@@ -685,7 +685,7 @@ static int lxc_cmd_console_winch_callback(int fd, struct lxc_cmd_req *req,
...
@@ -685,7 +685,7 @@ static int lxc_cmd_console_winch_callback(int fd, struct lxc_cmd_req *req,
{
{
struct
lxc_cmd_rsp
rsp
=
{
.
data
=
0
};
struct
lxc_cmd_rsp
rsp
=
{
.
data
=
0
};
lxc_
console
_sigwinch
(
SIGWINCH
);
lxc_
terminal
_sigwinch
(
SIGWINCH
);
return
lxc_cmd_rsp_send
(
fd
,
&
rsp
);
return
lxc_cmd_rsp_send
(
fd
,
&
rsp
);
}
}
...
...
src/lxc/console.c
View file @
dad4a039
...
@@ -96,7 +96,7 @@ static void lxc_terminal_winch(struct lxc_tty_state *ts)
...
@@ -96,7 +96,7 @@ static void lxc_terminal_winch(struct lxc_tty_state *ts)
lxc_cmd_console_winch
(
ts
->
winch_proxy
,
ts
->
winch_proxy_lxcpath
);
lxc_cmd_console_winch
(
ts
->
winch_proxy
,
ts
->
winch_proxy_lxcpath
);
}
}
void
lxc_
console
_sigwinch
(
int
sig
)
void
lxc_
terminal
_sigwinch
(
int
sig
)
{
{
struct
lxc_list
*
it
;
struct
lxc_list
*
it
;
struct
lxc_tty_state
*
ts
;
struct
lxc_tty_state
*
ts
;
...
...
src/lxc/console.h
View file @
dad4a039
...
@@ -119,7 +119,7 @@ extern int lxc_console_mainloop_add(struct lxc_epoll_descr *, struct lxc_pty *)
...
@@ -119,7 +119,7 @@ extern int lxc_console_mainloop_add(struct lxc_epoll_descr *, struct lxc_pty *)
/*
/*
* Handle SIGWINCH events on the allocated ptys.
* Handle SIGWINCH events on the allocated ptys.
*/
*/
extern
void
lxc_
console
_sigwinch
(
int
sig
);
extern
void
lxc_
terminal
_sigwinch
(
int
sig
);
/*
/*
* Connect to one of the ptys given to the container via lxc.tty.max.
* Connect to one of the ptys given to the container via lxc.tty.max.
...
@@ -199,7 +199,7 @@ extern void lxc_terminal_winsz(int srcfd, int dstfd);
...
@@ -199,7 +199,7 @@ extern void lxc_terminal_winsz(int srcfd, int dstfd);
* Note that the signal handler isn't installed as a classic asychronous
* Note that the signal handler isn't installed as a classic asychronous
* handler, rather signalfd(2) is used so that we can handle the signal when
* handler, rather signalfd(2) is used so that we can handle the signal when
* we're ready for it. This avoids deadlocks since a signal handler (ie
* we're ready for it. This avoids deadlocks since a signal handler (ie
* lxc_
console
_sigwinch()) would need to take the thread mutex to prevent
* lxc_
terminal
_sigwinch()) would need to take the thread mutex to prevent
* lxc_ttys list corruption, but using the fd we can provide the tty_state
* lxc_ttys list corruption, but using the fd we can provide the tty_state
* needed to the callback (lxc_console_cb_signal_fd()).
* needed to the callback (lxc_console_cb_signal_fd()).
*
*
...
...
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