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:45:16 +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 23:24, Peter Maydell wrote:
> On 10 September 2015 at 16:15, Chen Gang <address@hidden> wrote:
>> 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.
> 
> If you want settings to apply to all child qemu processes, use the
> environment variables... that is one of the things they are for.
> 

Yes it will be work well. :-)

>> 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.
> 
> I think it would be unexpected behaviour for command line arguments
> provided to one QEMU program to affect the execution of a different
> QEMU process.
> 

For me, I guess, it should be still OK:

 - For execve(), the input parameters should always have effect with (
   since we treate it as one un-normal process).

 - For other QEMU cases (really different QEMU child processes).

   If they have their own command line options, the will override the
   env variables which may be set by original command line parameters.

   If they have no their own command line options, they need inherit the
   parent QEMU process's command line options (e.g. -strace, -d ...).


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]