]> mj.ucw.cz Git - eval.git/commitdiff
Isolate: Fix up some bugs
authorMartin Mares <mj@ucw.cz>
Sat, 21 Apr 2012 20:50:01 +0000 (22:50 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 21 Apr 2012 20:50:01 +0000 (22:50 +0200)
isolate/isolate.c

index 73f545e688747148a7a4bed82c98361ef02f00cd..20d9f9f5dd35714356f1b1f19406b117409a9c0c 100644 (file)
@@ -506,7 +506,8 @@ static void init_dir_rules(void)
 
 static void make_dir(char *path)
 {
-  char *sep = path;
+  char *sep = (path[0] == '/' ? path+1 : path);
+
   for (;;)
     {
       sep = strchr(sep, '/');
@@ -1147,7 +1148,7 @@ usage(void)
 Usage: isolate [<options>] <command>\n\
 \n\
 Options:\n\
--b, --box-id=<id>\t\tWhen multiple sandboxes are used in parallel, each must get a unique ID\n\
+-b, --box-id=<id>\tWhen multiple sandboxes are used in parallel, each must get a unique ID\n\
 -c, --cg[=<parent>]\tPut process in a control group (optionally a sub-group of <parent>)\n\
     --cg-mem=<size>\tLimit memory usage of the control group to <size> KB\n\
     --cg-timing\t\tTime limits affects total run time of the control group\n\