The kernel copies the context of the parent process to the child process. This includes duplicating the CPU registers, memory mappings (using a copy-on-write strategy for efficiency), open file descriptors, and signal handlers. The kernel function used to copy the process context is :-
int copy_process_context(struct task_struct *parent, struct task_struct *child)
This function duplicates the process context, ensuring the child process starts with the same execution state as that of parent.
While copying the process context, the text segment is shared, while the stack segment, data segment and code segment follow the copy-on-write mechanism.