#11797: Calling getpid() from constructor of global static object returns 0 --------------------------+------------------------------ Reporter: tokoe | Owner: nobody Type: bug | Status: new Priority: normal | Milestone: R1 Component: System/POSIX | Version: R1/Development Keywords: | Blocked By: Blocking: | Has a Patch: 0 Platform: x86 | --------------------------+------------------------------ If you call getpid() from within the constructor of a custom class and create a global static object of that class, getpid() returns 0 instead of the process ID. Calling getpid() from inside main() function or any scope that is entered later on, works fine. -- Ticket URL: <https://dev.haiku-os.org/ticket/11797> Haiku <https://dev.haiku-os.org> Haiku - the operating system.