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
686dd5d1
Unverified
Commit
686dd5d1
authored
Nov 01, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: reap child in all cases
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
6b9f82a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
conf.c
src/lxc/conf.c
+10
-5
No files found.
src/lxc/conf.c
View file @
686dd5d1
...
...
@@ -3672,7 +3672,7 @@ int userns_exec_1(struct lxc_conf *conf, int (*fn)(void *), void *data,
struct
lxc_list
*
it
;
struct
id_map
*
map
;
char
c
=
'1'
;
int
ret
=
-
1
;
int
ret
=
-
1
,
status
=
-
1
;
struct
lxc_list
*
idmap
=
NULL
,
*
tmplist
=
NULL
;
struct
id_map
*
container_root_uid
=
NULL
,
*
container_root_gid
=
NULL
,
*
host_uid_map
=
NULL
,
*
host_gid_map
=
NULL
;
...
...
@@ -3842,10 +3842,11 @@ int userns_exec_1(struct lxc_conf *conf, int (*fn)(void *), void *data,
goto
on_error
;
}
on_error:
/* Wait for child to finish. */
ret
=
wait_for_pid
(
pid
);
if
(
pid
>
0
)
status
=
wait_for_pid
(
pid
);
on_error:
if
(
idmap
)
lxc_free_idmap
(
idmap
);
if
(
container_root_uid
)
...
...
@@ -3861,6 +3862,9 @@ on_error:
close
(
p
[
0
]);
close
(
p
[
1
]);
if
(
status
<
0
)
ret
=
-
1
;
return
ret
;
}
...
...
@@ -4024,10 +4028,11 @@ int userns_exec_full(struct lxc_conf *conf, int (*fn)(void *), void *data,
goto
on_error
;
}
on_error:
/* Wait for child to finish. */
ret
=
wait_for_pid
(
pid
);
if
(
pid
>
0
)
ret
=
wait_for_pid
(
pid
);
on_error:
if
(
idmap
)
lxc_free_idmap
(
idmap
);
if
(
host_uid_map
&&
(
host_uid_map
!=
container_root_uid
))
...
...
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