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
f3304a29
Commit
f3304a29
authored
Jul 13, 2010
by
Ferenc Wagner
Committed by
Daniel Lezcano
Jul 13, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forward signals to the container init
Signed-off-by:
Ferenc Wagner
<
wferi@niif.hu
>
Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
d1c383f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
start.c
src/lxc/start.c
+14
-8
No files found.
src/lxc/start.c
View file @
f3304a29
...
...
@@ -195,13 +195,13 @@ static int setup_sigchld_fd(sigset_t *oldmask)
sigset_t
mask
;
int
fd
;
if
(
sigprocmask
(
SIG_BLOCK
,
NULL
,
&
mask
))
{
SYSERROR
(
"failed to get mask signal"
);
return
-
1
;
}
if
(
sigaddset
(
&
mask
,
SIGCHLD
)
||
sigprocmask
(
SIG_BLOCK
,
&
mask
,
oldmask
))
{
SYSERROR
(
"failed to set
mask signal
"
);
/* Block everything except serious error signals */
if
(
sigfillset
(
&
mask
)
||
sigdelset
(
&
mask
,
SIGILL
)
||
sigdelset
(
&
mask
,
SIGSEGV
)
||
sigdelset
(
&
mask
,
SIGBUS
)
||
sigprocmask
(
SIG_BLOCK
,
&
mask
,
oldmask
))
{
SYSERROR
(
"failed to set
signal mask
"
);
return
-
1
;
}
...
...
@@ -231,7 +231,7 @@ static int sigchld_handler(int fd, void *data,
ret
=
read
(
fd
,
&
siginfo
,
sizeof
(
siginfo
));
if
(
ret
<
0
)
{
ERROR
(
"failed to read sig
chld
info"
);
ERROR
(
"failed to read sig
nal
info"
);
return
-
1
;
}
...
...
@@ -240,6 +240,12 @@ static int sigchld_handler(int fd, void *data,
return
-
1
;
}
if
(
siginfo
.
ssi_signo
!=
SIGCHLD
)
{
kill
(
*
pid
,
siginfo
.
ssi_signo
);
INFO
(
"forwarded signal %d to pid %d"
,
siginfo
.
ssi_signo
,
*
pid
);
return
0
;
}
if
(
siginfo
.
ssi_code
==
CLD_STOPPED
||
siginfo
.
ssi_code
==
CLD_CONTINUED
)
{
INFO
(
"container init process was stopped/continued"
);
...
...
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