Call getpid() directly instead of using an internal API.

Change-Id: Icf318df22694addccf4bbb888416899caddb5047
(cherry picked from commit efb6e235a825475832f09de8a1b498ad980c1b89)
Merge "Call getpid() directly instead of using an internal API." into R1.10