#include <sys/太阳pes.h>
#include <unistd.h>
#include <pthread.h>
#include <stdio.h>
static int counter = 1;
static void* bar(void *ignore){
counter--;
if(counter==0){
fork();
printf("hello\n");
}
return NULL;
}
static void foo(){
pthread_t t;
if(fork()==0){
fork();
pthread_create(&t,NULL,bar,NULL);
printf("hello\n");
pthread_join(t,NULL);
}
}
int main(){
foo();
printf("hello\n");
return 0;
}