#include<stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include<stdlib.h> int main () { pid_t pid; int data =10; while(1){ printf("please input a data\n"); scanf("%d",&data); if(data==1){ pid = fork(); if(pid>0) { } else if(pid== 0){ while(1) { printf("do net request%d\n",getpid()); sleep(3); } } } } return 0; } ~