Home fork(): Unix Has Been Spawning Children Irresponsibly Since 1969

    fork(): Unix Has Been Spawning Children Irresponsibly Since 1969

    0
    9
    blank

    The fork() system call — Unix’s mechanism for creating new processes — works by having a process clone itself entirely, producing a nearly identical child that immediately wanders off to do something else. It’s elegant, powerful, and deeply weird when you think about it: the child process wakes up in an identical copy of its parent’s memory, blinking in confusion, before diverging down its own path. The kernel cleans up after any process that exits before its parent collects the return code; those abandoned, lingering processes are called — with remarkable candor — zombies. Unix systems have been quietly generating and reaping zombie processes for over fifty years, making your Linux box considerably more metal than its uptime statistics suggest.