On Wed, Apr 8, 2009 at 11:03 AM, Tyler Littlefield <ty...@tysdomain.com> wrote:

> I sorta got it. so you control the parent process from it's half of the if
> and the child from the other half?

The fork happens right at the line where the call to fork occurs --
essentially, in the middle of function the parent process bifurcates.
When the call to fork returns in the child process, it will always
return 0. When the call returns in the parent, it will always return a
non-zero value.

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to