if ( ( pid = fork() ) < 0 ) fork_error has happened else if ( pid == 0 ) /* I am the child */ do things the child process should do else /* I am the parent */ do things the parent should do