answersLogoWhite

0


Best Answer

Fork() is a concept that originated in the UNIX world. Running programs are called processes, and the only way to execute a new program is for a current program to fork() itself, thereby creating a separate process. The process that called fork() is known as the parent process, and the newly created process is known as the child process. The child process, which begins its life as a copy of the parent process, can be "replaced".

In UNIX, the first program that is executed after booting finishes is the init process. This process will fork() and load the getty program over the child process, thereby creating a process which will prompt the user for a password.

Since a call to fork() creates a child process which is in essence the same as the parent process, it is necessary to determine (from within the process) which process is the child, and which is the parent. Upon successful execution, the fork() call returns the child's Process ID in the parent process, and a 0 in the child process. You can then use the child to execute a system call, such as running another program (or whatever you needed a second process for).

If you are using pipes (for communication between the child and parent process), make sure you have the parent wait for it.

---

In open source programming, a fork is a separate project that starts as a copy of another one. If the developers have it out with one another, or a developer wants to take the project in a different direction, then they copy the source code to a new repository and work on it there, completely separate from the original project.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a fork in computer programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between fork and vfork?

Look up information on programming.


Advantages of computer programming?

The advantages of computer programming is that it pays well since programming is a creative task. Computer programming helps human beings solve problems on a regular basis.


What is the diffirence of computer programming and computer science?

Computer science is a more abstract study of computing techniques; which will include computer programming. Computer programming, as it implies, is the practise of writing programs for computers.


How many pages does The Art of Computer Programming have?

The Art of Computer Programming has 634 pages.


How is writing is somewhat like computer programming?

writing and computer programming are basically the same!


How do you remove the governor on a 1992 dodge stealth rt tt?

It is part of the computer programming and can not be removed.It is part of the computer programming and can not be removed.


Where did IBM get their programming language?

Computer programming language


What has the author Edsger Wybe Dijkstra written?

Edsger Wybe Dijkstra has written: 'Selected writings on computing' -- subject(s): Computer programming, Computers, Electronic data processing 'EWD 316' -- subject(s): Computer programming 'A method of programming' -- subject(s): Computer programming 'A discipline of programming' -- subject(s): Computer programming


What is the easiest way to learn computer programming?

computer programming for dummies its a book and it teaches you everything


How do you remove the governor on a 2009 Jeep Liberty?

The "governor" is part of the computer programming and can not be removed.The "governor" is part of the computer programming and can not be removed.


What do you call a person who is addicted to computer programming?

One thing that you can call a person that is addicted to computer programming is a computer nerd. A computer nerd is always on the computer.


When was The Art of Computer Programming created?

The Art of Computer Game Design was created in 1984.