Clone system call example

This is a quick article on Clone system call example without talking shit. So let’s see some pointers for the same : clone() creates a new process, in a manner similar to fork. It is actually a library function layered on top of the underlying clone()system call. Unlike fork , these calls allow the child process to share parts of its execution context with the calling process, such as the memory space, the table of file descriptors, and the table of signal handlers....

September 10, 2016 · 2 min · 419 words · Vishal Chovatiya

Create Process Using fork()

Points To Catch When we fork in any process it simply creates a copy of the same process which we call child process 1 2 Parent Child return PID 0 Fork returns 0 in the child process & PID of the child process in the parent process, which you can see in above example. returns -1 on failer. Create copy of process including memory variables & stored value in it with its own address space Example 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 #include <stdio....

September 10, 2016 · 2 min · 323 words · Vishal Chovatiya