Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old October 2nd, 2008, 12:51 PM
Newbie
 
Join Date: Oct 2008
Posts: 2
Default 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..
Reply
  #2  
Old October 5th, 2008, 04:19 PM
arne's Avatar
Expert
 
Join Date: Oct 2006
Posts: 307
Default

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

HTH,
Arne
Reply
  #3  
Old October 5th, 2008, 07:39 PM
Newbie
 
Join Date: Oct 2008
Posts: 2
Default

i could only use clone() to create a process, professor gave this homework... there are few information or examples about clone()..
Reply
  #4  
Old October 6th, 2008, 08:33 AM
arne's Avatar
Expert
 
Join Date: Oct 2006
Posts: 307
Default

Quote:
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
Reply
Reply

Bookmarks

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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles