title: Shared memory pages and fork
body: <p>If the parent is sharing some pages with another process and we fork the parent. From what I know the child copies the page tables and we set the pages as read-only and do Copy-On-Write. But this will create a copy of the shared memory page if we write to it which is wrong. How does the Linux kernel avoid this?</p>