This program is about the POSIX fork() syscall. Zig favors standard library functions std.process.spawn() and std.process.run() functions instead of using OS specific functions like fork(). The spawn and run functions use appropriate OS specific functions underneath and the code we write can stay OS agnostic. As we already saw the spawn function in blog 13, let's look at run function in this blog. The run function allows the programmer to have more control over the child process than spawn. Lets use it to run another process of the same executable. There are several reasons why one would want to do this.
Fault isolation
Security sandboxing
True hard memory limits
Lets see the code for a program that spins itself up on startup as a worker.






