[lxc-devel] [PATCH 1/5] cgroup: minor bugfixes so start and attach work again

Serge Hallyn serge.hallyn at ubuntu.com
Mon Aug 19 19:16:31 UTC 2013


Quoting Christian Seiler (christian at iwakd.de):
> Hi Serge,
> 
> > This needs to just be
> > 
> > 	oldlen = newlen;
> 
> Oh, yes, that's right, it's the buffer length and not the string length.
> Sorry, I did that late at night and some things got mixed up in my head.
> 
> >> @@ -1128,7 +1152,7 @@ void lxc_cgroup_destroy_desc(struct cgroup_desc *cgroups)
> >>  int lxc_cgroup_attach(pid_t pid, const char *name, const char *lxcpath)
> >>  {
> >>  	FILE *f;
> >> -	char *line = NULL, ret = -1;
> >> +	char *line = NULL, ret = 0;
> >>  	size_t len = 0;
> >>  	int first = 1;
> >>  	char *dirpath;
> > 
> > Note you are returning 0 here if /proc/groups couldn't be opened.  Was
> > that your intent?  Should I just add a 'return -1' on that failure?
> 
> Oh, sorry, yes, you're right. Again, late at night. ;)

Thanks, Christian - I've pushed a new patch to github on top of yours.
Regular start/stop/lxc-cgroup stuff is working for me both with all
cgroups composed and separately mounted.

-serge




More information about the lxc-devel mailing list