This patch complements the C runtime with support for fork, getpid, and wait4 (and its cousin 'waitpid'). Fixes #3478