EmbLogic's Blog

what does child_pid>1 and exit(0)mean???

#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>
#include<stdlib.h>
int main()
{

pid_t child_pid;

child_pid = fork ();
if (child_pid > 0)
{

}else

{

exit(0);

}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>