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
c5fbf7f0
Commit
c5fbf7f0
authored
Mar 13, 2014
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: daemonize in startone
This should finally silence this test for good :) Signed-off-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
d7085142
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
18 deletions
+5
-18
startone.c
src/tests/startone.c
+5
-18
No files found.
src/tests/startone.c
View file @
c5fbf7f0
...
...
@@ -163,24 +163,11 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"%d: failed to get extra ref to container
\n
"
,
__LINE__
);
exit
(
1
);
}
c
->
want_daemonize
(
c
,
false
);
pid_t
pid
=
fork
();
if
(
pid
<
0
)
{
fprintf
(
stderr
,
"%d: fork failed
\n
"
,
__LINE__
);
goto
out
;
}
if
(
pid
==
0
)
{
close
(
0
);
close
(
1
);
close
(
2
);
open
(
"/dev/zero"
,
O_RDONLY
);
open
(
"/dev/null"
,
O_RDWR
);
open
(
"/dev/null"
,
O_RDWR
);
b
=
c
->
startl
(
c
,
0
,
NULL
);
if
(
!
b
)
fprintf
(
stderr
,
"%d: %s failed to start
\n
"
,
__LINE__
,
c
->
name
);
lxc_container_put
(
c
);
exit
(
!
b
);
c
->
want_daemonize
(
c
,
true
);
if
(
!
c
->
startl
(
c
,
0
,
NULL
))
{
fprintf
(
stderr
,
"%d: %s failed to start
\n
"
,
__LINE__
,
c
->
name
);
exit
(
1
);
}
sleep
(
3
);
...
...
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