arm: getpid() when creating a new process with clone, getpid() returns a wrong pid.

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Sep 2 07:33:23 UTC 2014


On 2 September 2014 04:43:17 CEST, Xishi Qiu <qiuxishi at huawei.com> wrote:
>On 2014/8/31 16:35, Waldemar Brodkorb wrote:
>
>> HI,
>> wangyufen wrote,
>> 
>>>  Called getpid() When creating a new process with clone(), getpid()
>returns the father_process's value. 
>>>  It should be child_process's value.
>> 
>> I think I see the same bug running the testsuite:
>> http://openadk.org/test/
>> tst-getpid1 and tst-getpid2 are failing.
>> 
>> Any idea for a patch?
>> 
>> best regards
>>  Waldemar
>>  
>
>Hi,
>
>Does anyone know how to fix the bug?

There seems to be missing a RESET_PID in the arm clone impl (potentially also on other arches).
Thanks,



More information about the uClibc mailing list