wasi-libc/libc-bottom-half/getpid/getpid.c
Dan Gohman 659ff41456 Implement emulated support for getpid.
Add a simple `getpid` emulation function which just returns a fixed
value, for applications that just use it for logging.
2021-04-05 16:58:36 -07:00

7 lines
126 B
C

#include <unistd.h>
pid_t getpid(void) {
// Return an arbitrary value, greater than 1 which is special.
return 42;
}