EmbLogic's Blog

USING WAIT WHILE DOING MULTIPLE CHILD AND PARENT

head 1.7;
access;
symbols;
locks
ashish:1.7; strict;
comment @ * @;

1.7
date 2015.03.24.13.22.13; author ashish; state Exp;
branches;
next 1.6;

1.6
date 2015.03.24.13.20.46; author ashish; state Exp;
branches;
next 1.5;

1.5
date 2015.03.24.13.16.32; author ashish; state Exp;
branches;
next 1.4;

1.4
date 2015.03.24.13.14.02; author ashish; state Exp;
branches;
next 1.3;

1.3
date 2015.03.24.13.12.18; author ashish; state Exp;
branches;
next 1.2;

1.2
date 2015.03.24.13.11.36; author ashish; state Exp;
branches;
next 1.1;

1.1
date 2015.03.24.13.10.53; author ashish; state Exp;
branches;
next ;

desc
@@

1.7
log
@now we will use WEXITSTATUS(),where it willl fetch the code with which the child have been terminated.

@

1.6
log
@now using the fun WIFEXITED(),where it will take the variable in its argu to point where the exit code have been stored

@

1.5
log
@now taking a if(),condition which will run when the value return by the fork() would be greater than the 0,i.e for parent
where a c1pid variable of prototype pid_t have been declared which will get the return pid of child when it will terminate by giving the wait() to parent so that parent can wait,and child can terminate normally
@
text
@a16 1

@

1.4
log
@providing a for loop
where child and parent would execute in sequence by printing their mesages and pids
where pids will be obtained by using getpid(),getppid()
@
text
@a18 1

a21 1

@

1.3
log
@now doing a fork

where the child and parent would be created
now defining the exit code for each of parent and child
@
text
@a8 1

@

1.2
log
@declaring the header files
declaing the variabels
@
text
@a53 1

@

1.1
log
@Initial revision
@
text
@d54 1
@

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>