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
45265bfd
Unverified
Commit
45265bfd
authored
Mar 12, 2019
by
Christian Brauner
Committed by
GitHub
Mar 12, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2903 from flx42/fix-pid-namespace-pdeathsig-handling
Fix PID namespace pdeathsig handling
parents
2009688d
b765aa88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
start.c
src/lxc/start.c
+1
-1
utils.c
src/lxc/utils.c
+2
-2
No files found.
src/lxc/start.c
View file @
45265bfd
...
@@ -1112,7 +1112,7 @@ static int do_start(void *data)
...
@@ -1112,7 +1112,7 @@ static int do_start(void *data)
* exit before we set the pdeath signal leading to a unsupervized
* exit before we set the pdeath signal leading to a unsupervized
* container.
* container.
*/
*/
ret
=
lxc_set_death_signal
(
SIGKILL
,
0
);
ret
=
lxc_set_death_signal
(
SIGKILL
,
handler
->
monitor_pid
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
SYSERROR
(
"Failed to set PR_SET_PDEATHSIG to SIGKILL"
);
SYSERROR
(
"Failed to set PR_SET_PDEATHSIG to SIGKILL"
);
goto
out_warn_father
;
goto
out_warn_father
;
...
...
src/lxc/utils.c
View file @
45265bfd
...
@@ -1705,9 +1705,9 @@ int lxc_set_death_signal(int signal, pid_t parent)
...
@@ -1705,9 +1705,9 @@ int lxc_set_death_signal(int signal, pid_t parent)
ret
=
prctl
(
PR_SET_PDEATHSIG
,
prctl_arg
(
signal
),
prctl_arg
(
0
),
ret
=
prctl
(
PR_SET_PDEATHSIG
,
prctl_arg
(
signal
),
prctl_arg
(
0
),
prctl_arg
(
0
),
prctl_arg
(
0
));
prctl_arg
(
0
),
prctl_arg
(
0
));
/*
C
heck whether we have been orphaned. */
/*
If not in a PID namespace, c
heck whether we have been orphaned. */
ppid
=
(
pid_t
)
syscall
(
SYS_getppid
);
ppid
=
(
pid_t
)
syscall
(
SYS_getppid
);
if
(
ppid
!=
parent
)
{
if
(
ppid
&&
ppid
!=
parent
)
{
ret
=
raise
(
SIGKILL
);
ret
=
raise
(
SIGKILL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
-
1
;
return
-
1
;
...
...
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