Get the latest tech news
Disillusioning the Magic of the Fork System Call
How the kernels implement the fork system call
To avoid having to write assembly by hand to invoke system calls, libc provides these wrappers which do the same thing under the hood. But the process holds a lot more details inside of it that I’ve not shown, things like open file handles, signal handlers, locks etc. We explored the role of registers and system call conventions, showing how fork cleverly uses them to return distinct values for parent and child.
Or read this on Hacker News