#include #include #include #include void *threa(void *data){ while(1){ sleep(1); } } int main(int argc, char *argv[]) { int count = 0; pthread_t p_thread; while(1){ count++; if(pthread_create(&p_thread,NULL,threa,NULL) == -1){ perror("thread create error"); exit(0); }else{ printf("Thread Create Sucess : %d\n", count); } } return 0; }