27.4.3.1. getpid

The minimal interesting example is to use fork and observe different PIDs.

A more minimal test-like example without forking can be seen at: userland/posix/getpid.c.

This example can for example be used used to play with: gem5 syscall emulation multiple executables.