| // Copyright 2013 Google Inc. All Rights Reserved. | |
| #include <sys/types.h> | |
| pid_t getpid() { | |
| // Returning -1 with an errno like ENOSYS is not POSIX compliant. It requires | |
| // getpid to always succeed, but we do not have a way to obtain host's real | |
| // pid (see https://code.google.com/p/nativeclient/issues/detail?id=537). | |
| // The best we can do is just to return an arbitrary chosen positive number. | |
| return 42; | |
| } |