BookRags.com Literature Guides Literature
Guides
Criticism & Essays Criticism &
Essays
Questions & Answers Questions &
Answers
Lesson Plans Lesson
Plans
My Bibliography Periodic Table U.S. Presidents Shakespeare Sonnet Shake-Up
Research Anything:        
History | Encyclopedias | Films | News | Create a Bibliography | More... Login | Register | Help
Not What You Meant?  There are 25 definitions for Clone.  Also try: Clone (function).

Clone (Linux system call)

Print-Friendly
About 1 pages (142 words)

Bookmark and Share Know this topic well? Help others and get FREE products!

clone() is a system call on the Linux kernel related to multithreading. The syntax for calling clone under a Linux program is:

#include <sched.h>
int clone (int (*fn) (void *), void *child_stack, int flags, void *arg);

clone creates a new thread that starts with function pointed to by the fn argument (as opposed to fork() which continues with the next command after fork().) The child_stack argument is a pointer to a memory space to be used as the stack for the new thread (which must be malloc'ed before that; on most architectures stack grows down, so the pointer should point at the end of the space), flags specify what gets inherited from the parent process, and arg is the argument passed to the function. It returns the process ID of the child process or -1 on failure.

View More Summaries on Clone (Linux system call)
 
Ask any question on Clone (Linux system call) and get it answered FAST!
Answer questions in BookRags Q&A and earn points toward
discounted or even FREE Study Guides and other BookRags products!
Learn more about BookRags Q&A
Copyrights
Clone (Linux system call) from Wíkipedia. ©2006 by Wíkipedia. Licensed under the GNU Free Documentation License. View a list of authors or edit this article.

Article Navigation
Join BookRagslearn moreJoin BookRags




About BookRags | Customer Service | Report an Error | Terms of Use | Privacy Policy