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
5379ce78
Commit
5379ce78
authored
Oct 07, 2009
by
Daniel Lezcano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do some cleanup around the old init pid file
This file is no longer used, let's remove it. Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
6e47d493
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
39 deletions
+0
-39
start.c
src/lxc/start.c
+0
-39
No files found.
src/lxc/start.c
View file @
5379ce78
...
...
@@ -178,40 +178,6 @@ out_sigfd:
goto
out
;
}
static
int
save_init_pid
(
const
char
*
name
,
pid_t
pid
)
{
char
init
[
MAXPATHLEN
];
char
*
val
;
int
fd
,
err
=
-
1
;
snprintf
(
init
,
MAXPATHLEN
,
LXCPATH
"/%s/init"
,
name
);
if
(
!
asprintf
(
&
val
,
"%d
\n
"
,
pid
))
{
SYSERROR
(
"failed to allocate memory"
);
goto
out
;
}
fd
=
open
(
init
,
O_WRONLY
|
O_CREAT
|
O_TRUNC
,
S_IRUSR
|
S_IWUSR
);
if
(
fd
<
0
)
{
SYSERROR
(
"failed to open '%s'"
,
init
);
goto
out_free
;
}
if
(
write
(
fd
,
val
,
strlen
(
val
))
<
0
)
{
SYSERROR
(
"failed to write the init pid"
);
goto
out_close
;
}
err
=
0
;
out_close:
close
(
fd
);
out_free:
free
(
val
);
out:
return
err
;
}
static
void
remove_init_pid
(
const
char
*
name
,
pid_t
pid
)
{
char
init
[
MAXPATHLEN
];
...
...
@@ -473,11 +439,6 @@ int lxc_spawn(const char *name, struct lxc_handler *handler, char *const argv[])
goto
out_abort
;
}
if
(
save_init_pid
(
name
,
handler
->
pid
))
{
ERROR
(
"failed to save the init pid info"
);
goto
out_abort
;
}
if
(
lxc_setstate
(
name
,
RUNNING
))
{
ERROR
(
"failed to set state to %s"
,
lxc_state2str
(
RUNNING
));
...
...
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