In this chapter, we learned how to handle communications between processes using three main functionalities: exit codes, signals, and pipes.
Exit codes are 8-bit values between 0 and 255 that are returned by a process to their parent. An exit code of 0 means that the application execution was successful. It's pretty easy to return an exit code in Go, but doing so using the os.Exit function shortcuts the execution of the deferred functions. When a panic occurs, all the deferred functions are executed and the returned code is 2. Getting an exit code from a child process is relatively trickier, because it's OS-dependent; however, in Unix systems, it can be accomplished using a series of type assertions.
Signals are used to communicate with any process. They are 6-bit values, between 1 and 64, sent from one process to another using...