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

Christian Seiler christian at iwakd.de
Mon Aug 19 18:58:54 UTC 2013


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. ;)

-- Christian




More information about the lxc-devel mailing list