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().)
blackrosezy@gma il.com wrote:[color=blue]
> This question always in my mind,actually what is fork all about? When
> to use it? Any example? Thanks.
>[/color]
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.
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.
Comment