Le 14/06/2016 à 21:26, Joel Holdsworth a écrit :
> Previously, when emulating execve(2), qemu would execute a child
> instance of the emulator with the environment variables provided by
> the parent process. This caused problems with qemu if any of the
> variables affected the child emulator's behaviour e.g.
> LD_LIBRARY_PATH.

The best way to avoid that is to use a statically linked qemu.

> This patch solves this issue by passing the environment variables
> with '-E' arguments to the child qemu instance. The call to
> execve(2) is replaced by a call to execv(2) so that the parent
> emulator's environment variable state is propagated into the child.
> 
> Any variables from the host environment that are not in the in the
> execve() call are removed with a '-U' argument.

Run ./scripts/checkpatch.pl on your patch...

and add your Signed-off-by here.

The environment is already managed in linux-user/main.c:main(), I don't
understand why the qemu_execve() special case should differ from the
general case.

Thanks,
Laurent

Reply via email to