how to use clone()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kid420
    New Member
    • Oct 2008
    • 2

    how to use clone()

    I want to write a function using clone() to generate a simple process, which just need to print some information about the process, for example, pid of the parent process and pid of the child process..
  • arne
    Recognized Expert Contributor
    • Oct 2006
    • 315

    #2
    If we're talking C here, have a look at the functions fork(), getpid() and getppid().

    HTH,
    Arne

    Comment

    • kid420
      New Member
      • Oct 2008
      • 2

      #3
      i could only use clone() to create a process, professor gave this homework... there are few information or examples about clone()..

      Comment

      • arne
        Recognized Expert Contributor
        • Oct 2006
        • 315

        #4
        Originally posted by kid420
        i could only use clone() to create a process, professor gave this homework... there are few information or examples about clone()..
        Well, here is an article from the Linux Journal.

        This and 'man clone' should help.

        Cheers,
        arne

        Comment

        Working...