... pid_t pid; ... pid = fork(); if(pid > 0) { parent } else if(pid == 0) { child } else return -1; { error in fork() }