[PATCH v7 3/7] unshare: new applet

Denys Vlasenko vda.linux at googlemail.com
Fri Apr 1 17:46:55 UTC 2016


On Fri, Apr 1, 2016 at 6:48 PM, Denys Vlasenko <vda.linux at googlemail.com> wrote:
>> +       if (*argv) {
>> +               execvp(*argv, argv);
>> +               bb_perror_msg_and_die("failed to execute %s", *argv);
>> +       }
>> +
>> +       run_shell(getenv("SHELL"), 0, NULL, NULL);
>> +}
>
> Not compatible. PROG argument is mandatory, no implied shell.
> Basically, this bit needs to be replaced by single line,
>
>         BB_EXECVP_or_die(argv);

Here I am wrong. It is not documented to do it, but in fact
unshare from util-linux 2.27.1 does start the shell
if no PROG was given.

I pushed new applet to git, please review and test.

Thanks!


More information about the busybox mailing list