what is fork() ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • blackrosezy@gmail.com

    #1

    what is fork() ?

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

  • Phlip

    #2
    Re: what is fork() ?

    blackrosezy wrote:
    [color=blue]
    > This question always in my mind,actually what is fork all about? When
    > to use it? Any example? Thanks.[/color]



    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!!!


    Comment

    • benben

      #3
      Re: what is 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.

      Ben

      Comment

      • Nucc

        #4
        Re: what is fork() ?

        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

        Working...