lxc-attach needs to be able to attach a process to specific cgroup, so
cgroup_attach is renamed to lxc_cgroup_attach and now also defined in the
header file.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
return ret;
}
-static int cgroup_attach(const char *path, pid_t pid)
+int lxc_cgroup_attach(const char *path, pid_t pid)
{
FILE *f;
char tasks[MAXPATHLEN];
}
/* Let's add the pid to the 'tasks' file */
- if (cgroup_attach(cgname, pid)) {
+ if (lxc_cgroup_attach(cgname, pid)) {
SYSERROR("failed to attach pid '%d' to '%s'", pid, cgname);
rmdir(cgname);
return -1;
extern int lxc_cgroup_destroy(const char *name);
extern int lxc_cgroup_path_get(char **path, const char *subsystem, const char *name);
extern int lxc_cgroup_nrtasks(const char *name);
+extern int lxc_cgroup_attach(const char *path, pid_t pid);
extern int lxc_ns_is_mounted(void);
#endif