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
d3ff0fdf
Unverified
Commit
d3ff0fdf
authored
Jun 22, 2018
by
2xsec
Committed by
Christian Brauner
Dec 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: change exit() => _exit() system call in child process
Signed-off-by:
2xsec
<
dh48.jeong@samsung.com
>
parent
ebd961d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
monitor.c
src/lxc/monitor.c
+7
-7
No files found.
src/lxc/monitor.c
View file @
d3ff0fdf
...
...
@@ -331,13 +331,13 @@ int lxc_monitord_spawn(const char *lxcpath)
if
(
pipe
(
pipefd
)
<
0
)
{
SYSERROR
(
"Failed to create pipe."
);
exit
(
EXIT_FAILURE
);
_
exit
(
EXIT_FAILURE
);
}
pid2
=
fork
();
if
(
pid2
<
0
)
{
SYSERROR
(
"Failed to fork()."
);
exit
(
EXIT_FAILURE
);
_
exit
(
EXIT_FAILURE
);
}
if
(
pid2
)
{
...
...
@@ -357,18 +357,18 @@ int lxc_monitord_spawn(const char *lxcpath)
close
(
pipefd
[
0
]);
DEBUG
(
"Successfully synced with child process."
);
exit
(
EXIT_SUCCESS
);
_
exit
(
EXIT_SUCCESS
);
}
if
(
setsid
()
<
0
)
{
SYSERROR
(
"Failed to setsid()."
);
exit
(
EXIT_FAILURE
);
_
exit
(
EXIT_FAILURE
);
}
lxc_check_inherited
(
NULL
,
true
,
&
pipefd
[
1
],
1
);
if
(
null_stdfds
()
<
0
)
{
SYSERROR
(
"Failed to dup2() standard file descriptors to /dev/null."
);
exit
(
EXIT_FAILURE
);
_
exit
(
EXIT_FAILURE
);
}
close
(
pipefd
[
0
]);
...
...
@@ -376,7 +376,7 @@ int lxc_monitord_spawn(const char *lxcpath)
ret
=
snprintf
(
pipefd_str
,
LXC_NUMSTRLEN64
,
"%d"
,
pipefd
[
1
]);
if
(
ret
<
0
||
ret
>=
LXC_NUMSTRLEN64
)
{
ERROR
(
"Failed to create pid argument to pass to monitord."
);
exit
(
EXIT_FAILURE
);
_
exit
(
EXIT_FAILURE
);
}
DEBUG
(
"Using pipe file descriptor %d for monitord."
,
pipefd
[
1
]);
...
...
@@ -384,5 +384,5 @@ int lxc_monitord_spawn(const char *lxcpath)
execvp
(
args
[
0
],
args
);
SYSERROR
(
"failed to exec lxc-monitord"
);
exit
(
EXIT_FAILURE
);
_
exit
(
EXIT_FAILURE
);
}
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