vi ex1.c
gcc로 컴파일 후 실행함
fork() 로 child를 만들면 body를 공유하지 않고 각각의 memory에 body가 존재하게 됨.
fork()
→ 전역변수로 설정한 sum 을 각각 증가시켜 sum 값이 $20000 * 2000 = 40000000$ 이 된다.
sum
vi th.c
pthread_create()