Browse Source

Merge branch 'chroot' into bfgminer

Luke Dashjr 12 years ago
parent
commit
d1e929b62c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      miner.c

+ 2 - 1
miner.c

@@ -10636,7 +10636,8 @@ int main(int argc, char *argv[])
                 if (chroot(chroot_dir) != 0) {
                 if (chroot(chroot_dir) != 0) {
                        quit(1, "Unable to chroot");
                        quit(1, "Unable to chroot");
                 }
                 }
-		chdir("/");
+		if (chdir("/"))
+			quit(1, "Unable to chdir to chroot");
         }
         }
 #endif
 #endif