Monday, 18 November 2013

Create a process using fork() system call.

hey guys

here you can get the parallel processing basic

the first basic practical of the parallel processing is creating a process using fork system call

/* Create a process using fork() system call. */
#include <stdio.h>  
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>

int main(void)
   pid_t  pid;
      pid = fork();
   if (pid == -1)
      fprintf(stderr, "can't fork, error %d\n", errno);

   if (pid == 0)

      int j;
      for (j = 0; j < 10; j++)
         printf("child: %d\n", j);
      int i;
      for (i = 0; i < 10; i++)
         printf("parent: %d\n", i);
   return 0;


  1. Do yoս haѵe a spam issue on this website; I also am a bloցger, and I was curiօus about your
    situation; many of us have created some nice methods aոd we
    are looking to swap techոiques with others, be sure to shoot me an email if iոterested.

    Alѕo visit my blog post; how to become taller during puberty

  2. I think the admin of this site is actually working hard for his
    web page, for the reason that here every material is quality based information.

    my weblog ... how to grow taller

  3. I am regular reader, how are you everybody?
    This article posted at this web page is genuinely

    Here is my web page: grow taller 4 idiots

  4. Hello There. I found your blog using msn. This is an extremely well written article.
    I will make sure to bookmark it and return to read
    more of your useful information. Thanks for the post. I'll
    certainly comeback.

    Feel free to visit my website - grow taller 4 idiots

  5. Hello friends, how is the whole thing, and what you want to say regarding this piece of writing, in my
    view its truly amazing designed for me.

    my web site: windows replacement Burlington


Back to top!