23,116
社区成员
发帖
与我相关
我的任务
分享
#include <stdlib.h>
#include <stdio.h>
int main(){
pid_t pid;
if(pid=fork()<0) {
printf("frok error\n");
}
if(pid==0) {
printf("This is the child\n");
}
else{
printf("This is the parent\n");
}
exit(0);
}