what is fork() ?

B

blackrosezy

This question always in my mind,actually what is fork all about? When
to use it? Any example? Thanks.
 
P

Phlip

blackrosezy said:
This question always in my mind,actually what is fork all about? When
to use it? Any example? Thanks.

http://www.google.com/search?q=fork+example

Strictly speaking, fork() is off-topic for this newsgroup. That's not to say
nobody here should learn it - we all should. Yet fork() is a member of the
various POSIX standards, but not the C++ Standard, which covers the only
questions we are all qualified to answer. (If we are not, someone here will
correct us, which can't be said about off-topic things like fork().)
 
B

benben

This question always in my mind,actually what is fork all about? When
to use it? Any example? Thanks.

It clones the process itself then resumes from both of them
simultaneously. This is how you create a new process in unix. Google
folk() for more detail.

Ben
 
N

Nucc

For example a shell in linux. When you call a command, you start a new
process (fork), and when the program is ended, you catch it, and add
the prompt again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top