O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Parent and Child Lifetimes

Due to the nature of fork(), every process has exactly one parent process, while a parent can have multiple child processes. Unix enforces the rule that, while any process might or might not have children, every process always has a parent process. If a child process’ parent exits before the child does, then the child process is adopted by process 1. Under most Unixes, this is the init process; under Mac OS X, it is the versatile launchd.

When a child process exits, that is not the end of it. After a process terminates, the operating system keeps some information associated with it alive, such as its exit code and system resource usage statistics. Only after this information has been delivered to the child’s parent ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required