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
f78a1f32
Commit
f78a1f32
authored
Apr 02, 2010
by
Daniel Lezcano
Committed by
Daniel Lezcano
Apr 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix when console is not specified
When no console is specified, do not try to setup the console. Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
9b8e796c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
conf.c
src/lxc/conf.c
+3
-1
console.c
src/lxc/console.c
+8
-0
No files found.
src/lxc/conf.c
View file @
f78a1f32
...
...
@@ -676,8 +676,10 @@ static int setup_console(const char *rootfs, const struct lxc_console *console)
return
0
;
}
if
(
console
->
peer
==
-
1
)
if
(
console
->
peer
==
-
1
)
{
INFO
(
"no console output required"
);
return
0
;
}
if
(
stat
(
path
,
&
s
))
{
SYSERROR
(
"failed to stat '%s'"
,
path
);
...
...
src/lxc/console.c
View file @
f78a1f32
...
...
@@ -148,6 +148,9 @@ int lxc_create_console(struct lxc_conf *conf)
if
(
!
conf
->
rootfs
)
return
0
;
if
(
!
console
->
path
)
return
0
;
if
(
openpty
(
&
console
->
master
,
&
console
->
slave
,
console
->
name
,
NULL
,
NULL
))
{
SYSERROR
(
"failed to allocate a pty"
);
...
...
@@ -257,6 +260,11 @@ int lxc_console_mainloop_add(struct lxc_epoll_descr *descr,
return
0
;
}
if
(
!
console
->
path
)
{
INFO
(
"no console specified"
);
return
0
;
}
if
(
lxc_mainloop_add_handler
(
descr
,
console
->
master
,
console_handler
,
console
))
{
ERROR
(
"failed to add to mainloop console handler for '%d'"
,
...
...
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