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
435e1b87
Commit
435e1b87
authored
Aug 22, 2014
by
S.Çağlar Onur
Committed by
Stéphane Graber
Sep 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore SIGKILL (CTRL-C) and SIGQUIT (CTRL-\) - issue #313
Signed-off-by:
S.Çağlar Onur
<
caglar@10ur.org
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
2b96d9f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
attach.c
src/lxc/attach.c
+6
-1
No files found.
src/lxc/attach.c
View file @
435e1b87
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include <stdlib.h>
#include <signal.h>
#include <errno.h>
#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
#include <grp.h>
#include <grp.h>
...
@@ -601,7 +602,7 @@ static bool fetch_seccomp(const char *name, const char *lxcpath,
...
@@ -601,7 +602,7 @@ static bool fetch_seccomp(const char *name, const char *lxcpath,
struct
lxc_proc_context_info
*
i
,
lxc_attach_options_t
*
options
)
struct
lxc_proc_context_info
*
i
,
lxc_attach_options_t
*
options
)
{
{
struct
lxc_container
*
c
;
struct
lxc_container
*
c
;
if
(
!
(
options
->
namespaces
&
CLONE_NEWNS
)
||
!
(
options
->
attach_flags
&
LXC_ATTACH_LSM
))
if
(
!
(
options
->
namespaces
&
CLONE_NEWNS
)
||
!
(
options
->
attach_flags
&
LXC_ATTACH_LSM
))
return
true
;
return
true
;
...
@@ -771,6 +772,10 @@ int lxc_attach(const char* name, const char* lxcpath, lxc_attach_exec_t exec_fun
...
@@ -771,6 +772,10 @@ int lxc_attach(const char* name, const char* lxcpath, lxc_attach_exec_t exec_fun
goto
cleanup_error
;
goto
cleanup_error
;
}
}
/* ignore SIGKILL (CTRL-C) and SIGQUIT (CTRL-\) - issue #313 */
signal
(
SIGINT
,
SIG_IGN
);
signal
(
SIGQUIT
,
SIG_IGN
);
/* reap intermediate process */
/* reap intermediate process */
ret
=
wait_for_pid
(
pid
);
ret
=
wait_for_pid
(
pid
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
...
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