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
52f9292f
Unverified
Commit
52f9292f
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_stdin_cb()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
ae6d3913
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
console.c
src/lxc/console.c
+3
-3
console.h
src/lxc/console.h
+4
-4
No files found.
src/lxc/console.c
View file @
52f9292f
...
@@ -931,8 +931,8 @@ int lxc_terminal_set_stdfds(int fd)
...
@@ -931,8 +931,8 @@ int lxc_terminal_set_stdfds(int fd)
return
0
;
return
0
;
}
}
int
lxc_
console_cb_tty_stdin
(
int
fd
,
uint32_t
events
,
void
*
cbdata
,
int
lxc_
terminal_stdin_cb
(
int
fd
,
uint32_t
events
,
void
*
cbdata
,
struct
lxc_epoll_descr
*
descr
)
struct
lxc_epoll_descr
*
descr
)
{
{
struct
lxc_tty_state
*
ts
=
cbdata
;
struct
lxc_tty_state
*
ts
=
cbdata
;
char
c
;
char
c
;
...
@@ -1044,7 +1044,7 @@ int lxc_console(struct lxc_container *c, int ttynum,
...
@@ -1044,7 +1044,7 @@ int lxc_console(struct lxc_container *c, int ttynum,
}
}
ret
=
lxc_mainloop_add_handler
(
&
descr
,
ts
->
stdinfd
,
ret
=
lxc_mainloop_add_handler
(
&
descr
,
ts
->
stdinfd
,
lxc_
console_cb_tty_stdin
,
ts
);
lxc_
terminal_stdin_cb
,
ts
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
ERROR
(
"Failed to add stdin handler"
);
ERROR
(
"Failed to add stdin handler"
);
goto
close_mainloop
;
goto
close_mainloop
;
...
...
src/lxc/console.h
View file @
52f9292f
...
@@ -40,11 +40,11 @@ struct lxc_tty_state
...
@@ -40,11 +40,11 @@ struct lxc_tty_state
int
masterfd
;
int
masterfd
;
/* Escape sequence to use for exiting the pty. A single char can be
/* Escape sequence to use for exiting the pty. A single char can be
* specified. The pty can then exited by doing: Ctrl + specified_char + q.
* specified. The pty can then exited by doing: Ctrl + specified_char + q.
* This field is checked by lxc_
console_cb_tty_stdin
(). Set to -1 to
* This field is checked by lxc_
terminal_stdin_cb
(). Set to -1 to
* disable exiting the pty via a escape sequence.
* disable exiting the pty via a escape sequence.
*/
*/
int
escape
;
int
escape
;
/* Used internally by lxc_
console_cb_tty_stdin
() to check whether an
/* Used internally by lxc_
terminal_stdin_cb
() to check whether an
* escape sequence has been received.
* escape sequence has been received.
*/
*/
int
saw_escape
;
int
saw_escape
;
...
@@ -156,8 +156,8 @@ extern int lxc_terminal_set_stdfds(int fd);
...
@@ -156,8 +156,8 @@ extern int lxc_terminal_set_stdfds(int fd);
* lxc_terminal_mainloop_add().
* lxc_terminal_mainloop_add().
* This function exits the loop cleanly when an EPOLLHUP event is received.
* This function exits the loop cleanly when an EPOLLHUP event is received.
*/
*/
extern
int
lxc_
console_cb_tty_stdin
(
int
fd
,
uint32_t
events
,
void
*
cbdata
,
extern
int
lxc_
terminal_stdin_cb
(
int
fd
,
uint32_t
events
,
void
*
cbdata
,
struct
lxc_epoll_descr
*
descr
);
struct
lxc_epoll_descr
*
descr
);
/*
/*
* Handler for events on the master fd of the pty. To be registered via the
* Handler for events on the master fd of the pty. To be registered via the
...
...
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