Core Dump - Check for core dump

 /* core_dumpV1 */  
 // header files  
 #include<unistd.h>  
 #include<stdio.h>  
 //main func  
 void main(int argc,char *argv[])  
 {  
      int i,pid,exitstat,status,j=0;  
      pid=fork();  
      if(pid==0)  
      {  
           i=10/j;  
      }  
      else  
      {  
           wait(&status);  
           if(status&80)  
                printf("our core dumped\n");  
           else  
            printf("core dumped my foot\n");  
      }  
 }  

Comments

Popular posts from this blog

Setting up atalanta ATPG to work on Linux

Generating 16k ROM using Xilinx IP COREGEN and simulating it in modelsim

Sparse matrix - 3 tuple representation