Last Updated: 2022-05-26
Imagine you are running a Ruby program.
fork is used when you want a child process that will run code within
this same ruby program. However
spawn is used if you want to run another
external program. It's the equivalent of running
fork followed by
The original caller process can choose to wait or continue concurrently without waiting.