On 9/10/15 23:24, Peter Maydell wrote:
> On 10 September 2015 at 16:15, Chen Gang <xili_gchen_5...@hotmail.com> 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