fork创建一个子进程的一般目的
int main(){
pid_t pyd;
int data;
while(1){
printf("input data : \n");
scanf("%d",&data);
if(data==5){
pyd=fork();
if(pyd==0){
while(1){
printf("creat person is %d\n",getpid());
sleep(3);
}
}
}
else{
printf(" error restore !\n");
}
}
return 0;
}