1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

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

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