Fix unintended extra fork in chroot(1).

This commit is contained in:
Jonas 'Sortie' Termansen 2015-12-11 02:52:32 +01:00
parent 23810c1a48
commit cf5c2706b3
1 changed files with 0 additions and 6 deletions

View File

@ -171,12 +171,6 @@ int main(int argc, char* argv[])
sigprocmask(SIG_SETMASK, &oldset, NULL);
}
pid_t child_pid = 0;
if ( devices )
child_pid = fork();
if ( child_pid < 0 )
error(1, errno, "fork");
if ( chroot(argv[1]) != 0 )
error(1, errno, "`%s'", argv[1]);