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 - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913