}
};
+ DEBUG("using cgroup mounted at '%s'", mnt);
+
fclose(file);
out:
return err;
ret = rename(oldname, newname);
if (ret)
SYSERROR("failed to rename cgroup %s->%s", oldname, newname);
+ else
+ DEBUG("'%s' renamed to '%s'", oldname, newname);
+
return ret;
}
ret = symlink(nsgroup, lxc);
if (ret)
SYSERROR("failed to create symlink %s->%s", nsgroup, lxc);
- return ret;
+ else
+ DEBUG("'%s' linked to '%s'", nsgroup, lxc);
+
+ return ret;
}
int lxc_unlink_nsgroup(const char *name)
rmdir(path);
}
+ DEBUG("unlinking '%s'", nsgroup);
+
return unlink(nsgroup);
}
return -1;
}
+ DEBUG("sigchild handler set");
+
return fd;
}
static int sigchld_handler(int fd, void *data,
struct lxc_epoll_descr *descr)
{
+ DEBUG("child exited");
+
return 1;
}
}
console[0] = '\0';
+
+ DEBUG("console initialized");
+
return 0;
}
LXC_TTY_ADD_HANDLER(SIGQUIT);
out:
+ if (handler)
+ INFO("'%s' is initialized", name);
+
return handler;
out_delete_tty:
goto out_child;
}
+ NOTICE("exec'ing '%s'", argv[0]);
+
execvp(argv[0], argv);
SYSERROR("failed to exec %s", argv[0]);
err = 0;
+ NOTICE("'%s' started with pid '%d'", argv[0], handler->pid);
+
out_close:
close(sv[0]);
close(sv[1]);