#include<pthread.h>
#include"apue.h"
#include<stdlib.h>

#include<stdio.h>


void * test(void* a)
{
        printf("test\n");
}


int main(int argc, char * argv[])
{

        if(argc<2)
        {

         err_quit("command exe num\n");
        }

        int i=0;
        int num;
        num = atoi(argv[1]);        //숫자 인자 받은거를 num으로 넣고

        pthread_t thread[num];  //num만큼 스레드 선언하고

       

        for(i=0;i<num;i++)           //num만큼 for 돌리면서 스레드생성
        {
        pthread_create(&thread[i], 0, test,0);  //테스트 함수 수행
        }

}


일케 했는데 테스트 함수에는 프린트문으로 test만 출력되게 했습니다.

만약 인자로 3을 주면

test

test

test 나와야 하는거 아닌가요?? 아무 반응이없네여 ㅜㅜ