what is fork() ?

Discussion in 'C++' started by blackrosezy@gmail.com, Mar 20, 2006.

  1. Guest

    This question always in my mind,actually what is fork all about? When
    to use it? Any example? Thanks.
     
    , Mar 20, 2006
    #1
    1. Advertising

  2. Phlip Guest

    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!!!
     
    Phlip, Mar 20, 2006
    #2
    1. Advertising

  3. benben Guest

    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
     
    benben, Mar 20, 2006
    #3
  4. Nucc Guest

    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.
     
    Nucc, Mar 20, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CwK

    fork

    CwK, Dec 22, 2003, in forum: Perl
    Replies:
    2
    Views:
    953
    Misha Gale
    Jan 4, 2004
  2. Josh Denny

    fork in perl 5.8.3 on windows

    Josh Denny, Mar 2, 2004, in forum: Perl
    Replies:
    2
    Views:
    6,733
    Jim Gibson
    Mar 2, 2004
  3. Patrick
    Replies:
    1
    Views:
    537
  4. xchris
    Replies:
    5
    Views:
    4,147
  5. Eric Snow

    os.fork and pty.fork

    Eric Snow, Jan 8, 2009, in forum: Python
    Replies:
    0
    Views:
    601
    Eric Snow
    Jan 8, 2009
Loading...

Share This Page