waitpid wait for another process and get exit code. build gcc waitpid.c -o waitpid usage waitpid <pid>