why is fork() called fork()?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
mariuszp
Member
Member
Posts: 587
Joined: Sat Oct 16, 2010 3:38 pm

why is fork() called fork()?

Post by mariuszp »

Just wondering. Why is the fork() function actually called fork()? It has nothing to do with dining instruments.
Octocontrabass
Member
Member
Posts: 5512
Joined: Mon Mar 25, 2013 7:01 pm

Re: why is fork() called fork()?

Post by Octocontrabass »

A fork is something that splits into several (usually two) similar parts. The utensil's name comes from the fact that its shape is a fork. Other things can have fork shapes too; you may occasionally hear of roads or rivers that fork. (Yes, "fork" is also a verb.)

This concept of "one thing that splits into many" is a very good description for the process of turning one thread into two nearly-identical threads, so the system call that performs that task is called "fork". You can also have forks in source control and filesystems.
User avatar
BASICFreak
Member
Member
Posts: 284
Joined: Fri Jan 16, 2009 8:34 pm
Location: Louisiana, USA

Re: why is fork() called fork()?

Post by BASICFreak »

Image
fork
fôrk/Submit
noun
1.
an implement with two or more prongs used for lifting food to the mouth or holding it when cutting.
2.
a device, component, or part with two or more prongs, in particular.
verb
1.
(especially of a road or other route) divide into two parts.
"the place where the road forks"
synonyms: split, branch (off), divide, subdivide, separate, part, diverge, go in different directions, bifurcate; More
2.
dig, lift, or manipulate (something) with a fork.
"fork in some compost"
Look at verb:1

EDIT: seems I wasn't fast enough with my reply ;)
BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
Sortie wrote:
  • Don't play the role of an operating systems developer, be one.
  • Be truly afraid of undefined [behavior].
  • Your operating system should be itself, not fight what it is.
mariuszp
Member
Member
Posts: 587
Joined: Sat Oct 16, 2010 3:38 pm

Re: why is fork() called fork()?

Post by mariuszp »

Oh, i see, i wasn't aware of the other meaning outside of IT.
danielbj
Member
Member
Posts: 36
Joined: Thu Dec 16, 2010 3:08 pm

Re: why is fork() called fork()?

Post by danielbj »

It's because you give your program a fork, so it can eat more resources! :D

Daniel Broder Jensen
UNICORN OS
AMenard
Member
Member
Posts: 67
Joined: Mon Aug 25, 2014 1:27 pm

Re: why is fork() called fork()?

Post by AMenard »

I'm working on a more modern and feature full implementation of fork()... It will be called spork()!
davidsmith0143
Posts: 16
Joined: Tue Jun 28, 2016 12:16 am

Re: why is fork() called fork()?

Post by davidsmith0143 »

hi, i found this piece of information.. it is a very good read.. http://www.foodreference.com/html/art-h ... k-729.html
Post Reply