Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #813669
| From | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> |
|---|---|
| Newsgroups | linux.debian.bugs.dist, linux.debian.maint.glibc |
| Subject | Bug#857909: [libc6-dev] getpid() in child process created using clone(CLONE_VM) returns parent's pid |
| Date | 2017-03-17 00:10 +0100 |
| Message-ID | <tlMGS-5rI-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Cross-posted to 2 groups.
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 syscall alternative if possible: > Versions of the GNU C library that include the NPTL threading library contain a wrapper function for getpid(2) > that performs caching of PIDs. This caching relies on support in the glibc wrapper for clone(), but as currently > implemented, the cache may not be up to date in some circumstances. Can you elaborate a bit more where your sample code contradicts the clone(2) manpage which documents the buggy behavior? Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaubitz@debian.org `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Back to linux.debian.bugs.dist | Previous | Next — Next in thread | Find similar | Unroll thread
Bug#857909: [libc6-dev] getpid() in child process created using clone(CLONE_VM) returns parent's pid John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2017-03-17 00:10 +0100 Bug#857909: [libc6-dev] getpid() in child process created using clone(CLONE_VM) returns parent's pid Florian Weimer <fw@deneb.enyo.de> - 2017-03-23 16:00 +0100
csiph-web