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
20b4a592
Unverified
Commit
20b4a592
authored
Jan 16, 2019
by
Christian Brauner
Committed by
GitHub
Jan 16, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2785 from lifeng68/fix_return
start: __lxc_start return -1 when start fails
parents
bd72001f
575ea467
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
start.c
src/lxc/start.c
+4
-0
No files found.
src/lxc/start.c
View file @
20b4a592
...
@@ -1940,16 +1940,19 @@ int __lxc_start(const char *name, struct lxc_handler *handler,
...
@@ -1940,16 +1940,19 @@ int __lxc_start(const char *name, struct lxc_handler *handler,
if
(
!
attach_block_device
(
handler
->
conf
))
{
if
(
!
attach_block_device
(
handler
->
conf
))
{
ERROR
(
"Failed to attach block device"
);
ERROR
(
"Failed to attach block device"
);
ret
=
-
1
;
goto
out_fini_nonet
;
goto
out_fini_nonet
;
}
}
if
(
!
cgroup_ops
->
monitor_create
(
cgroup_ops
,
handler
))
{
if
(
!
cgroup_ops
->
monitor_create
(
cgroup_ops
,
handler
))
{
ERROR
(
"Failed to create monitor cgroup"
);
ERROR
(
"Failed to create monitor cgroup"
);
ret
=
-
1
;
goto
out_fini_nonet
;
goto
out_fini_nonet
;
}
}
if
(
!
cgroup_ops
->
monitor_enter
(
cgroup_ops
,
handler
->
monitor_pid
))
{
if
(
!
cgroup_ops
->
monitor_enter
(
cgroup_ops
,
handler
->
monitor_pid
))
{
ERROR
(
"Failed to enter monitor cgroup"
);
ERROR
(
"Failed to enter monitor cgroup"
);
ret
=
-
1
;
goto
out_fini_nonet
;
goto
out_fini_nonet
;
}
}
...
@@ -1994,6 +1997,7 @@ int __lxc_start(const char *name, struct lxc_handler *handler,
...
@@ -1994,6 +1997,7 @@ int __lxc_start(const char *name, struct lxc_handler *handler,
if
(
!
handler
->
init_died
&&
handler
->
pid
>
0
)
{
if
(
!
handler
->
init_died
&&
handler
->
pid
>
0
)
{
ERROR
(
"Child process is not killed"
);
ERROR
(
"Child process is not killed"
);
ret
=
-
1
;
goto
out_abort
;
goto
out_abort
;
}
}
...
...
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