[haiku-bugs] [Haiku] #11797: Calling getpid() from constructor of global static object returns 0

  • From: "tokoe" <trac@xxxxxxxxxxxx>
  • Date: Mon, 26 Jan 2015 19:04:05 -0000

#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.

Other related posts: