The new process created with fork() is an exact copy of its parent
Everything is copied from the parent except for file locks and any pending signals
the fork() system call has a return value of > 0 if you’re the parent, if you’re the child the value will be 0. If there is an error the return value will be less than 0.
fork() doesn’t copy all memory to the child at first. The child process shares the memory of the parent until the child or parent needs to write to the memory. Then the process that needs to modify the memory makes a copy of just that page and makes it’s change. This is called Copy On Write (COW).
On Linux, c libraries typically implement fork() by wrapping clone()