Episode #457: Subprocesses Part 9: Exec

If you read any books or articles on UNIX process management, you'll notice that two system calls come up over and over again: fork and exec. These two commands are sort of the twin pillars of process-spawning on POSIX systems, and a lot of documentation simply assumes that you understand how they work. But maybe you come from a different OS background. Or maybe you've always been afraid to ask. Or maybe you have a basic understanding of these calls, but you aren't entirely clear on how to apply them in practical ways. Today we're going to tackle the second of these two essential system calls: exec. We'll learn how it works by building a practical development tool in Ruby: a script that kicks off a local, directory-specific instance of the Apache web server.

This page is just for members. Sign in or subscribe to gain access!