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: Chen Gang
Subject: Re: [Qemu-devel] [PATCH] linux-user/main.c: Always set QEMU_LD_PREFIX when interp_prefix is changed
Date: Thu, 10 Sep 2015 23:15:27 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 9/10/15 20:35, Peter Maydell wrote:
> On 10 September 2015 at 10:32, Chen Gang <address@hidden> wrote:
>>
>> 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.
> 

Yes, we have to use binfmt_misc to let execve() run correctly. After
let execve() run correctly, I am analyzing another issue when let qemu
run wine (it is a pending issue, I guess, it is related with mmu).

At present, I often change the input parameters (e.g. -strace, -d ...),
if we let a qemu process itself always know about its input parameters,
it will be really useful.

For qemu, I still feel that we need notice about the mismatch between
env variables and input parameters.

 - If we are sure the input parameters are only for one normal process,
   we need not care about the mismatch between env variables and input
   parameters (I guess, most of programs need not care about it).

 - But if we have to process the un-normal process (e.g. our qemu), we
   have to notice about the mismatch between evn variables and input
   parameters. Or command line users may meet various strange things.

 - Since we provide the command line options, we have to always let them
   be correct within one normal or un-normal process.


Thanks
-- 
Chen Gang (陈刚)

Open, share, and attitude like air, water, and life which God blessed



reply via email to

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