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
b234e44f
Commit
b234e44f
authored
Dec 17, 2010
by
Daniel Lezcano
Committed by
Daniel Lezcano
Dec 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change nscgroup interface
Prepare the nscgroup to be converted to the clone_children changes. Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
7c282e3c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
cgroup.c
src/lxc/cgroup.c
+2
-2
cgroup.h
src/lxc/cgroup.h
+1
-1
start.c
src/lxc/start.c
+1
-1
No files found.
src/lxc/cgroup.c
View file @
b234e44f
...
...
@@ -85,7 +85,7 @@ out:
return
err
;
}
int
lxc_rename_nsgroup
(
const
char
*
name
,
struct
lxc_handler
*
handler
)
int
lxc_rename_nsgroup
(
const
char
*
name
,
pid_t
pid
)
{
char
oldname
[
MAXPATHLEN
];
char
newname
[
MAXPATHLEN
];
...
...
@@ -97,7 +97,7 @@ int lxc_rename_nsgroup(const char *name, struct lxc_handler *handler)
return
-
1
;
}
snprintf
(
oldname
,
MAXPATHLEN
,
"%s/%d"
,
cgroup
,
handler
->
pid
);
snprintf
(
oldname
,
MAXPATHLEN
,
"%s/%d"
,
cgroup
,
pid
);
snprintf
(
newname
,
MAXPATHLEN
,
"%s/%s"
,
cgroup
,
name
);
/* there is a previous cgroup, assume it is empty, otherwise
...
...
src/lxc/cgroup.h
View file @
b234e44f
...
...
@@ -26,7 +26,7 @@
#define MAXPRIOLEN 24
struct
lxc_handler
;
int
lxc_rename_nsgroup
(
const
char
*
name
,
struct
lxc_handler
*
handler
);
int
lxc_rename_nsgroup
(
const
char
*
name
,
pid_t
pid
);
int
lxc_unlink_nsgroup
(
const
char
*
name
);
int
lxc_cgroup_path_get
(
char
**
path
,
const
char
*
name
);
int
lxc_cgroup_nrtasks
(
const
char
*
name
);
...
...
src/lxc/start.c
View file @
b234e44f
...
...
@@ -506,7 +506,7 @@ int lxc_spawn(struct lxc_handler *handler)
if
(
lxc_sync_wait_child
(
handler
,
LXC_SYNC_CONFIGURE
))
failed_before_rename
=
1
;
if
(
lxc_rename_nsgroup
(
name
,
handler
))
if
(
lxc_rename_nsgroup
(
name
,
handler
->
pid
))
goto
out_delete_net
;
if
(
failed_before_rename
)
...
...
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