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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of magic

magic

Photo of fork system call

fork system call

Related news:

News photo

A reaction that only measured protons detected neutrons for the first time | For the last 10 years, scientists have been working on a neutron detector. Finally, they tested it, and it worked like magic.

News photo

Nvidia’s Magic Fades | Bloomberg Technology

News photo

Where Does the Magic Go as We Grow Older? (2020)