int main(){
    int a,status,ch;
    unsigned long pid,cpid,gpid;
    char *c=malloc(512);

    if(!c) return 1;
    a=0;    
    switch((pid=vfork())){
	case -1:

	    printf("%s\n","Error call of vfork");
	    return 1;	    
	case  0:  
	    cpid=getpid();	
	    a=1;
	    printf("%ld %s a=%d\n",cpid,"We inside child process",a);	
	    exit(0);
    };

    wait(&status);
    gpid=getpid();
    printf("%ld %s a=%d\n",gpid,"We inside parent process",a);	    
    printf("%s\n",c);	    
    free(c);
    return 1;    
};