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
8945dad0
Unverified
Commit
8945dad0
authored
May 21, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start: reorder START_SYNC_POST_CONFIGURE
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
46a3bf07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
start.c
src/lxc/start.c
+19
-12
No files found.
src/lxc/start.c
View file @
8945dad0
...
@@ -1800,32 +1800,32 @@ static int lxc_spawn(struct lxc_handler *handler)
...
@@ -1800,32 +1800,32 @@ static int lxc_spawn(struct lxc_handler *handler)
ERROR
(
"Failed to create the network"
);
ERROR
(
"Failed to create the network"
);
goto
out_delete_net
;
goto
out_delete_net
;
}
}
ret
=
lxc_network_send_to_child
(
handler
);
if
(
ret
<
0
)
{
ERROR
(
"Failed to send veth names to child"
);
goto
out_delete_net
;
}
}
}
/* Tell the child to continue its initialization. */
if
(
!
lxc_sync_wake_child
(
handler
,
START_SYNC_POST_CONFIGURE
))
goto
out_delete_net
;
ret
=
lxc_rootfs_prepare_parent
(
handler
);
ret
=
lxc_rootfs_prepare_parent
(
handler
);
if
(
ret
)
{
if
(
ret
)
{
ERROR
(
"Failed to prepare rootfs"
);
ERROR
(
"Failed to prepare rootfs"
);
goto
out_delete_net
;
goto
out_delete_net
;
}
}
if
(
handler
->
ns_clone_flags
&
CLONE_NEWNET
)
{
ret
=
lxc_network_send_to_child
(
handler
);
if
(
ret
<
0
)
{
ERROR
(
"Failed to send veth names to child"
);
goto
out_delete_net
;
}
}
if
(
!
lxc_list_empty
(
&
conf
->
procs
))
{
if
(
!
lxc_list_empty
(
&
conf
->
procs
))
{
ret
=
setup_proc_filesystem
(
&
conf
->
procs
,
handler
->
pid
);
ret
=
setup_proc_filesystem
(
&
conf
->
procs
,
handler
->
pid
);
if
(
ret
<
0
)
if
(
ret
<
0
)
goto
out_delete_net
;
goto
out_delete_net
;
}
}
/* Tell the child to continue its initialization. We'll get
* START_SYNC_CGROUP when it is ready for us to setup cgroups.
*/
if
(
!
lxc_sync_barrier_child
(
handler
,
START_SYNC_POST_CONFIGURE
))
goto
out_delete_net
;
if
(
!
lxc_list_empty
(
&
conf
->
limits
))
{
if
(
!
lxc_list_empty
(
&
conf
->
limits
))
{
ret
=
setup_resource_limits
(
&
conf
->
limits
,
handler
->
pid
);
ret
=
setup_resource_limits
(
&
conf
->
limits
,
handler
->
pid
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
...
@@ -1834,6 +1834,13 @@ static int lxc_spawn(struct lxc_handler *handler)
...
@@ -1834,6 +1834,13 @@ static int lxc_spawn(struct lxc_handler *handler)
}
}
}
}
/*
* Wait for the child to tell us that it's ready for us to prepare
* cgroups.
*/
if
(
!
lxc_sync_wait_child
(
handler
,
START_SYNC_CGROUP
))
goto
out_delete_net
;
if
(
!
lxc_sync_barrier_child
(
handler
,
START_SYNC_CGROUP_UNSHARE
))
if
(
!
lxc_sync_barrier_child
(
handler
,
START_SYNC_CGROUP_UNSHARE
))
goto
out_delete_net
;
goto
out_delete_net
;
...
...
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