nommu: fix cases where we mangle argv[0][0]

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2011-11-22 17:19:26 +01:00
parent fcb9e07eca
commit d2277e262f
4 changed files with 7 additions and 0 deletions

View File

@ -384,6 +384,7 @@ int cpio_main(int argc UNUSED_PARAM, char **argv)
goto dump;
}
/* parent */
USE_FOR_NOMMU(argv[-optind][0] &= 0x7f); /* undo fork_or_rexec() damage */
xchdir(*argv++);
close(pp.wr);
xmove_fd(pp.rd, STDIN_FILENO);