Skip to content

Demo: Creating a Process with posix_spawn()

Run

make
./posix_spawn

In a second terminal, while it runs:

ps -ef | grep '[s]leep 100'

Ask

  • Which PID is the parent and which is the child?
  • What does waitpid() do, and what would happen without it?