During fork, between child and parent process in the process context, the following occurs:-
The text segment is shared as it is read only.
For the stack, data and code segment, initially the data is shared, but once either process tries to modify the data, the page containing the data is copied, ensuring that each process has its own version of data.