The function below is broken, it does never return if a path looks
like "//foo/bar" and corrupts the thread stack.
HINT: dirname("//") does _not_ return "/".
This is most likely the reason why I saw all the strange things.
Debugging this was not fun because valgrind and gdb were useless because they
do not see the cloned() thread. (Dunno exactly why).
from utils.c:
extern int mkdir_p(char *dir, mode_t mode)
{
int ret;
char *d;
if (!strcmp(dir, "/"))
return 0;
d = strdup(dir);
if (!d)
return -1;
ret = mkdir_p(dirname(d), mode);
free(d);
if (ret)
return -1;
if (!access(dir, F_OK))
return 0;
if (mkdir(dir, mode)) {
SYSERROR("failed to create directory '%s'\n", dir);
return -1;
}
return 0;
}
Thanks,
//richard
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Lxc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxc-devel