	#include <sys/signal.h>
	main(){
		int pid, i,j,stat;
		char c;

		if ((pid=fork())==0) {
			write(1,"       inside child\n",20);
			/* printf("      inside child; pid = %d\n",pid);
			printf("      inside child; my pid = %d\n",getpid());
			printf("      inside child; my parent's pid = %d\n",getppid());
			*/
		 	while(1)                  
				{
				for (j=0;j<10000000;j++); 
				write(1,"       inside child\n",20);
				}
			exit(0);
			}
		else {
			printf("       want to terminate child? If so type a char and press enter");
			scanf(&c);
			printf("return value of kill is %d\n",kill(pid,SIGKILL));
			wait(&stat);
			printf("value of stat is %d \n",stat);
			printf("       inside parent; child terminated\n",21);
			printf("return value of kill is %d\n",kill(pid,SIGKILL));
			}
		write(1,"       common part\n",19);
		}
