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
44eff075
Unverified
Commit
44eff075
authored
Jun 26, 2018
by
Christian Brauner
Committed by
GitHub
Jun 26, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2430 from duguhaotian/work
clear ONLCR flag for container pty
parents
508f4700
e5adb2b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
attach.c
src/lxc/attach.c
+8
-0
terminal.c
src/lxc/terminal.c
+6
-0
No files found.
src/lxc/attach.c
View file @
44eff075
...
...
@@ -24,6 +24,7 @@
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <termios.h>
#include <grp.h>
#include <pwd.h>
#include <signal.h>
...
...
@@ -979,6 +980,7 @@ static int lxc_attach_terminal(struct lxc_conf *conf,
struct
lxc_terminal
*
terminal
)
{
int
ret
;
struct
termios
oldtios
;
lxc_terminal_init
(
terminal
);
...
...
@@ -988,6 +990,12 @@ static int lxc_attach_terminal(struct lxc_conf *conf,
return
-
1
;
}
ret
=
lxc_setup_tios
(
terminal
->
master
,
&
oldtios
);
if
(
ret
<
0
)
{
SYSERROR
(
"Failed to setup terminal"
);
return
-
1
;
}
/* Shift ttys to container. */
ret
=
lxc_terminal_map_ids
(
conf
,
terminal
);
if
(
ret
<
0
)
{
...
...
src/lxc/terminal.c
View file @
44eff075
...
...
@@ -510,6 +510,7 @@ int lxc_setup_tios(int fd, struct termios *oldtios)
#ifdef IEXTEN
newtios
.
c_lflag
&=
~
IEXTEN
;
#endif
newtios
.
c_oflag
&=
~
ONLCR
;
newtios
.
c_oflag
|=
OPOST
;
newtios
.
c_cc
[
VMIN
]
=
1
;
newtios
.
c_cc
[
VTIME
]
=
0
;
...
...
@@ -896,6 +897,7 @@ int lxc_terminal_setup(struct lxc_conf *conf)
{
int
ret
;
struct
lxc_terminal
*
terminal
=
&
conf
->
console
;
struct
termios
oldtios
;
if
(
terminal
->
path
&&
strcmp
(
terminal
->
path
,
"none"
)
==
0
)
{
INFO
(
"No terminal requested"
);
...
...
@@ -906,6 +908,10 @@ int lxc_terminal_setup(struct lxc_conf *conf)
if
(
ret
<
0
)
return
-
1
;
ret
=
lxc_setup_tios
(
terminal
->
master
,
&
oldtios
);
if
(
ret
<
0
)
return
-
1
;
ret
=
lxc_terminal_create_log_file
(
terminal
);
if
(
ret
<
0
)
goto
err
;
...
...
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