[Libreoffice] [PATCH] [NOT_URGENT] Some OSL cleanup
Arnaud Versini
arnaud.versini at gmail.com
Wed Dec 7 03:04:22 PST 2011
Hi
Oups sorry yes of course I'm wrong
Sorry for the bug
Best regards
2011/12/7 Stephan Bergmann <sbergman at redhat.com>
> -#if defined(LINUX)
>> -/* The linux kernel thread implemention, always return the pid of the
>> - thread subprocess and not of the main process. So we save the main
>> - pid at startup
>> +#if defined(LINUX) && defined (__GLIBC__) && __GLIBC__ == 2 ||
>> __GLIBC_MINOR__ < 4
>>
>
> The above looks broken, given that && binds tighter than ||. From the
> comments, I gather that what actually should be checked is that
> __GLIBC__.__GLIBC_MINOR__ < 2.4, right? So, since we would not care about
> glibc 1, anyway, the || should be replaced with a && I think.
>
> Stephan
>
> +/* The linux kernel 2.4 getpid implemention always return the pid of the
>> + thread subprocess and not of the main process, the NPTL implementation
>> + with a Linux kernel 2.6 kernel return the pid. So when possibly
>> + their is the wrong implementation of getpid, we save the pid at
>> startup.
>> FIXME: when our Linux base-line is above:
>> - + Linux kernel version 2.6.18 or higher; -> clone() for NTPL
>> - + glibc2 version 2.5 or higher; -> NPTL
>> + + Linux kernel version 2.6 or higher; -> clone() for NTPL
>> + + glibc2 version 2.4 or higher; -> No longer LinuxThreads, only
>> NPTL
>> Then we get a working getpid() and can remove this hack.
>> + FIXME: getppid is also wrong in this situation
>> */
>>
>
>
> ______________________________**_________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.**org <LibreOffice at lists.freedesktop.org>
> http://lists.freedesktop.org/**mailman/listinfo/libreoffice<http://lists.freedesktop.org/mailman/listinfo/libreoffice>
>
--
Arnaud Versini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111207/d9ee7825/attachment.html>
More information about the LibreOffice
mailing list