in reply to Forking vs. A New Process

Does your limited understanding of fork() come from windows?

On that platform, fork() is emulated using threads within a process, and if you want to start new processes, then you have to use OS specific calls (Win32::Process).

As tilly says, on unix like systems, fork clones your process to create two identical copies, one of which gets an arbitary label that says child.

The issues you have with zobmie processes, are simply that when a process quits, the OS keeps a record of it until the parent tells the OS that it is no longer interested in finding out what happened to it. There are system calls you can make to tell the OS that you are not interested in the fate of your child processes, so that it does not need to keep those records, then you won't get zombies.

I think the reason they are known as zombies, is untill they are reaped, they take up an entry in the process table, and on some older unixes, that table had limited space, so thousands of zombie processes could hurt performance, or even prevent new useful processes from starting.

Replies are listed 'Best First'.
Re^2: Forking vs. A New Process
by HalNineThousand (Beadle) on Feb 01, 2011 at 08:10 UTC

    Actually, my limited understanding of fork() is from being self taught and not having time to explore anything that wasn't directly related to a paycheck until recently.

    Thanks for the info -- it's quite helpful and it makes it sound simpler than I thought it was.