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
093bce5f
Unverified
Commit
093bce5f
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_mainloop_add()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
22b183ea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
attach.c
src/lxc/attach.c
+1
-1
console.c
src/lxc/console.c
+1
-1
console.h
src/lxc/console.h
+4
-4
start.c
src/lxc/start.c
+2
-2
No files found.
src/lxc/attach.c
View file @
093bce5f
...
...
@@ -1012,7 +1012,7 @@ static int lxc_attach_pty_mainloop_init(struct lxc_pty *pty,
return
-
1
;
}
ret
=
lxc_
console
_mainloop_add
(
descr
,
pty
);
ret
=
lxc_
terminal
_mainloop_add
(
descr
,
pty
);
if
(
ret
<
0
)
{
ERROR
(
"Failed to add handlers to mainloop"
);
lxc_mainloop_close
(
descr
);
...
...
src/lxc/console.c
View file @
093bce5f
...
...
@@ -433,7 +433,7 @@ static int lxc_terminal_mainloop_add_peer(struct lxc_pty *console)
return
0
;
}
int
lxc_
console
_mainloop_add
(
struct
lxc_epoll_descr
*
descr
,
int
lxc_
terminal
_mainloop_add
(
struct
lxc_epoll_descr
*
descr
,
struct
lxc_pty
*
console
)
{
int
ret
;
...
...
src/lxc/console.h
View file @
093bce5f
...
...
@@ -114,7 +114,7 @@ extern void lxc_console_free(struct lxc_conf *conf, int fd);
/*
* Register pty event handlers in an open mainloop
*/
extern
int
lxc_
console
_mainloop_add
(
struct
lxc_epoll_descr
*
,
struct
lxc_pty
*
);
extern
int
lxc_
terminal
_mainloop_add
(
struct
lxc_epoll_descr
*
,
struct
lxc_pty
*
);
/*
* Handle SIGWINCH events on the allocated ptys.
...
...
@@ -153,7 +153,7 @@ extern int lxc_console_set_stdfds(int fd);
/*
* Handler for events on the stdin fd of the pty. To be registered via the
* corresponding functions declared and defined in mainloop.{c,h} or
* lxc_
console
_mainloop_add().
* lxc_
terminal
_mainloop_add().
* 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
,
...
...
@@ -162,7 +162,7 @@ extern int lxc_console_cb_tty_stdin(int fd, uint32_t events, void *cbdata,
/*
* Handler for events on the master fd of the pty. To be registered via the
* corresponding functions declared and defined in mainloop.{c,h} or
* lxc_
console
_mainloop_add().
* lxc_
terminal
_mainloop_add().
* This function exits the loop cleanly when an EPOLLHUP event is received.
*/
extern
int
lxc_console_cb_tty_master
(
int
fd
,
uint32_t
events
,
void
*
cbdata
,
...
...
@@ -209,7 +209,7 @@ extern struct lxc_tty_state *lxc_terminal_signal_init(int srcfd, int dstfd);
/*
* Handler for signal events. To be registered via the corresponding functions
* declared and defined in mainloop.{c,h} or lxc_
console
_mainloop_add().
* declared and defined in mainloop.{c,h} or lxc_
terminal
_mainloop_add().
*/
extern
int
lxc_terminal_signalfd_cb
(
int
fd
,
uint32_t
events
,
void
*
cbdata
,
struct
lxc_epoll_descr
*
descr
);
...
...
src/lxc/start.c
View file @
093bce5f
...
...
@@ -531,13 +531,13 @@ int lxc_poll(const char *name, struct lxc_handler *handler)
if
(
has_console
)
{
struct
lxc_pty
*
console
=
&
handler
->
conf
->
console
;
ret
=
lxc_
console
_mainloop_add
(
&
descr
,
console
);
ret
=
lxc_
terminal
_mainloop_add
(
&
descr
,
console
);
if
(
ret
<
0
)
{
ERROR
(
"Failed to add console handlers to mainloop"
);
goto
out_mainloop_console
;
}
ret
=
lxc_
console
_mainloop_add
(
&
descr_console
,
console
);
ret
=
lxc_
terminal
_mainloop_add
(
&
descr_console
,
console
);
if
(
ret
<
0
)
{
ERROR
(
"Failed to add console handlers to console mainloop"
);
goto
out_mainloop_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