Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > what is fork() ?

Reply
Thread Tools

what is fork() ?

 
 
blackrosezy@gmail.com
Guest
Posts: n/a
 
      03-20-2006
This question always in my mind,actually what is fork all about? When
to use it? Any example? Thanks.

 
Reply With Quote
 
 
 
 
Phlip
Guest
Posts: n/a
 
      03-20-2006
blackrosezy wrote:

> 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().)

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!


 
Reply With Quote
 
 
 
 
benben
Guest
Posts: n/a
 
      03-20-2006
wrote:
> 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
 
Reply With Quote
 
Nucc
Guest
Posts: n/a
 
      03-20-2006
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments