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
fc26f086
Unverified
Commit
fc26f086
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_init()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
780a7c82
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
attach.c
src/lxc/attach.c
+2
-2
console.c
src/lxc/console.c
+2
-2
console.h
src/lxc/console.h
+1
-1
No files found.
src/lxc/attach.c
View file @
fc26f086
...
@@ -978,7 +978,7 @@ static int lxc_attach_pty(struct lxc_conf *conf, struct lxc_pty *pty)
...
@@ -978,7 +978,7 @@ static int lxc_attach_pty(struct lxc_conf *conf, struct lxc_pty *pty)
{
{
int
ret
;
int
ret
;
lxc_
pty
_init
(
pty
);
lxc_
terminal
_init
(
pty
);
ret
=
lxc_terminal_create
(
pty
);
ret
=
lxc_terminal_create
(
pty
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
...
@@ -1198,7 +1198,7 @@ int lxc_attach(const char *name, const char *lxcpath,
...
@@ -1198,7 +1198,7 @@ int lxc_attach(const char *name, const char *lxcpath,
pty
.
log_fd
=
options
->
log_fd
;
pty
.
log_fd
=
options
->
log_fd
;
}
else
{
}
else
{
lxc_
pty
_init
(
&
pty
);
lxc_
terminal
_init
(
&
pty
);
}
}
/* Create a socket pair for IPC communication; set SOCK_CLOEXEC in order
/* Create a socket pair for IPC communication; set SOCK_CLOEXEC in order
...
...
src/lxc/console.c
View file @
fc26f086
...
@@ -59,7 +59,7 @@ static struct lxc_list lxc_ttys;
...
@@ -59,7 +59,7 @@ static struct lxc_list lxc_ttys;
typedef
void
(
*
sighandler_t
)(
int
);
typedef
void
(
*
sighandler_t
)(
int
);
__attribute__
((
constructor
))
void
lxc_terminal_init
(
void
)
__attribute__
((
constructor
))
void
lxc_terminal_init
_global
(
void
)
{
{
lxc_list_init
(
&
lxc_ttys
);
lxc_list_init
(
&
lxc_ttys
);
}
}
...
@@ -1136,7 +1136,7 @@ void lxc_terminal_info_init(struct lxc_pty_info *pty)
...
@@ -1136,7 +1136,7 @@ void lxc_terminal_info_init(struct lxc_pty_info *pty)
pty
->
busy
=
-
1
;
pty
->
busy
=
-
1
;
}
}
void
lxc_
pty
_init
(
struct
lxc_pty
*
pty
)
void
lxc_
terminal
_init
(
struct
lxc_pty
*
pty
)
{
{
memset
(
pty
,
0
,
sizeof
(
*
pty
));
memset
(
pty
,
0
,
sizeof
(
*
pty
));
pty
->
slave
=
-
EBADF
;
pty
->
slave
=
-
EBADF
;
...
...
src/lxc/console.h
View file @
fc26f086
...
@@ -236,7 +236,7 @@ extern int lxc_make_controlling_pty(int fd);
...
@@ -236,7 +236,7 @@ extern int lxc_make_controlling_pty(int fd);
extern
int
lxc_login_pty
(
int
fd
);
extern
int
lxc_login_pty
(
int
fd
);
extern
void
lxc_pty_conf_free
(
struct
lxc_pty
*
console
);
extern
void
lxc_pty_conf_free
(
struct
lxc_pty
*
console
);
extern
void
lxc_terminal_info_init
(
struct
lxc_pty_info
*
pty
);
extern
void
lxc_terminal_info_init
(
struct
lxc_pty_info
*
pty
);
extern
void
lxc_
pty
_init
(
struct
lxc_pty
*
pty
);
extern
void
lxc_
terminal
_init
(
struct
lxc_pty
*
pty
);
extern
int
lxc_pty_map_ids
(
struct
lxc_conf
*
c
,
struct
lxc_pty
*
pty
);
extern
int
lxc_pty_map_ids
(
struct
lxc_conf
*
c
,
struct
lxc_pty
*
pty
);
#endif
#endif
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