qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user/main.c: Always set QEMU_LD_PREFIX wh


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] linux-user/main.c: Always set QEMU_LD_PREFIX when interp_prefix is changed
Date: Thu, 10 Sep 2015 13:35:21 +0100

On 10 September 2015 at 10:32, Chen Gang <address@hidden> wrote:
> From: address@hidden
>> Date: Thu, 10 Sep 2015 10:02:27 +0100
>>
>> On 10 September 2015 at 06:43, <address@hidden> wrote:
>>> From: Chen Gang <address@hidden>
>>>
>>> If qemu sets interp_prfix via command line '-L' instead of environments
>>> variable QEMU_LD_PREFIX, it will cause syscall execve() failed. Because
>>> the 2nd qemu has no command line '-L'.
>>>
>>> So qemu need always set QEMU_LD_PREFIX when interp_prefix is changed.
>>
>> I think this is user error. If you want exec to work automatically
>> onto a second QEMU then you need to set up binfmt misc with a
>> wrapper and probably the environment variables. I don't
>> think we need to turn all our command line switches into
>> environment variables: they're not supposed to be somehow
>> magically inherited by child QEMU processes.
>>
>
> For me, when users type a command line under Linux shell, they always
> assume all related executions will know about their commands, they need
> not set the environments again (at least, in one process, they assume so).
>
> execve() will not change the pid, so the users will 'feel': they are using 
> only
> one process.

But execve won't do the right thing if it's another target binary,
unless you've set up binfmt_misc. And if you're setting up
binfmt_misc then (a) you should just do it right and (b) you
wouldn't have been directly running QEMU with command line
arguments in the first place.

I really don't think we need to change anything here.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]