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
ae6d3913
Unverified
Commit
ae6d3913
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_set_stdfds()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
548029fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
console.c
src/lxc/console.c
+2
-2
console.h
src/lxc/console.h
+1
-1
start.c
src/lxc/start.c
+1
-1
No files found.
src/lxc/console.c
View file @
ae6d3913
...
@@ -905,7 +905,7 @@ err:
...
@@ -905,7 +905,7 @@ err:
return
-
ENODEV
;
return
-
ENODEV
;
}
}
int
lxc_
console
_set_stdfds
(
int
fd
)
int
lxc_
terminal
_set_stdfds
(
int
fd
)
{
{
if
(
fd
<
0
)
if
(
fd
<
0
)
return
0
;
return
0
;
...
@@ -1122,7 +1122,7 @@ int lxc_login_pty(int fd)
...
@@ -1122,7 +1122,7 @@ int lxc_login_pty(int fd)
if
(
ret
<
0
)
if
(
ret
<
0
)
return
-
1
;
return
-
1
;
ret
=
lxc_
console
_set_stdfds
(
fd
);
ret
=
lxc_
terminal
_set_stdfds
(
fd
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
-
1
;
return
-
1
;
...
...
src/lxc/console.h
View file @
ae6d3913
...
@@ -148,7 +148,7 @@ extern int lxc_console_getfd(struct lxc_container *c, int *ttynum,
...
@@ -148,7 +148,7 @@ extern int lxc_console_getfd(struct lxc_container *c, int *ttynum,
* fd is made a duplicate of a specific standard file descriptor iff the
* fd is made a duplicate of a specific standard file descriptor iff the
* standard file descriptor refers to a pty.
* standard file descriptor refers to a pty.
*/
*/
extern
int
lxc_
console
_set_stdfds
(
int
fd
);
extern
int
lxc_
terminal
_set_stdfds
(
int
fd
);
/*
/*
* Handler for events on the stdin fd of the pty. To be registered via the
* Handler for events on the stdin fd of the pty. To be registered via the
...
...
src/lxc/start.c
View file @
ae6d3913
...
@@ -1205,7 +1205,7 @@ static int do_start(void *data)
...
@@ -1205,7 +1205,7 @@ static int do_start(void *data)
if
(
handler
->
backgrounded
||
handler
->
conf
->
is_execute
==
0
)
if
(
handler
->
backgrounded
||
handler
->
conf
->
is_execute
==
0
)
ret
=
set_stdfds
(
handler
->
conf
->
console
.
slave
);
ret
=
set_stdfds
(
handler
->
conf
->
console
.
slave
);
else
else
ret
=
lxc_
console
_set_stdfds
(
handler
->
conf
->
console
.
slave
);
ret
=
lxc_
terminal
_set_stdfds
(
handler
->
conf
->
console
.
slave
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
ERROR
(
"Failed to redirect std{in,out,err} to pty file "
ERROR
(
"Failed to redirect std{in,out,err} to pty file "
"descriptor %d"
,
handler
->
conf
->
console
.
slave
);
"descriptor %d"
,
handler
->
conf
->
console
.
slave
);
...
...
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