Bug#857909: [libc6-dev] getpid() in child process created using clone(CLONE_VM) returns parent's pid

2017-03-23 Thread Florian Weimer
* John Paul Adrian Glaubitz: > I would suggest filing a bug report to glibc upstream or posting on > their mailing list to ask for feedback. Upstream has since removed the PID cache:

Bug#857909: [libc6-dev] getpid() in child process created using clone(CLONE_VM) returns parent's pid

2017-03-17 Thread John Paul Adrian Glaubitz
Hi Kirill! On 03/17/2017 10:30 AM, Kirill Tkhai wrote: > I interpret the below paragraph as the only "stale-cache" case: > >>> In particular, if a signal is delivered to the child immediately after >>> the clone() >>> call, then a call to getpid(2) in a handler for the signal may return the

Bug#857909: [libc6-dev] getpid() in child process created using clone(CLONE_VM) returns parent's pid

2017-03-16 Thread John Paul Adrian Glaubitz
Hi Kirill! > My case is not in the list of the cases, described in clone(2), > when wrong pid may be returned, so this is a BUG. Which case in particular do you mean? From the manpage it seems that getpid() is simply not reliable under various circumstances and that one should always use the