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
1ee85fbc
Commit
1ee85fbc
authored
Apr 19, 2016
by
Serge Hallyn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #982 from brauner/2016-04-19/mimic_ssh
use raw settings of ssh for pty
parents
cb730f01
a7c97a40
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
console.c
src/lxc/console.c
+11
-6
No files found.
src/lxc/console.c
View file @
1ee85fbc
...
@@ -260,16 +260,21 @@ int lxc_setup_tios(int fd, struct termios *oldtios)
...
@@ -260,16 +260,21 @@ int lxc_setup_tios(int fd, struct termios *oldtios)
newtios
=
*
oldtios
;
newtios
=
*
oldtios
;
/* Remove the echo characters and signal reception, the echo
/* We use the same settings that ssh does. */
* will be done with master proxying */
newtios
.
c_iflag
|=
IGNPAR
;
newtios
.
c_iflag
&=
~
(
IGNBRK
|
ISTRIP
|
INLCR
|
IGNCR
|
ICRNL
|
IXON
|
IXANY
|
IXOFF
);
newtios
.
c_iflag
&=
~
(
ISTRIP
|
INLCR
|
IGNCR
|
ICRNL
|
IXON
|
IXANY
|
IXOFF
);
newtios
.
c_iflag
&=
BRKINT
;
#ifdef IUCLC
newtios
.
c_lflag
&=
~
(
ECHO
|
ICANON
|
ISIG
|
IEXTEN
|
ECHOE
|
ECHOK
|
ECHONL
);
newtios
.
c_iflag
&=
~
IUCLC
;
#endif
newtios
.
c_lflag
&=
~
(
ISIG
|
ICANON
|
ECHO
|
ECHOE
|
ECHOK
|
ECHONL
);
#ifdef IEXTEN
newtios
.
c_lflag
&=
~
IEXTEN
;
#endif
newtios
.
c_oflag
&=
~
OPOST
;
newtios
.
c_oflag
&=
~
OPOST
;
newtios
.
c_cc
[
VMIN
]
=
1
;
newtios
.
c_cc
[
VMIN
]
=
1
;
newtios
.
c_cc
[
VTIME
]
=
0
;
newtios
.
c_cc
[
VTIME
]
=
0
;
/* Set new attributes */
/* Set new attributes
.
*/
if
(
tcsetattr
(
fd
,
TCSAFLUSH
,
&
newtios
))
{
if
(
tcsetattr
(
fd
,
TCSAFLUSH
,
&
newtios
))
{
ERROR
(
"failed to set new terminal settings"
);
ERROR
(
"failed to set new terminal settings"
);
return
-
1
;
return
-
1
;
...
...
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