diff --git a/Computer Science/Operating System/[OS] System Call (Fork Wait Exec).md b/Computer Science/Operating System/[OS] System Call (Fork Wait Exec).md index c56fcdb3..995ae6a6 100644 --- a/Computer Science/Operating System/[OS] System Call (Fork Wait Exec).md +++ b/Computer Science/Operating System/[OS] System Call (Fork Wait Exec).md @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) { printf("child (pid : %d)", (int) getpid()); } else { // (3) parent case - int wc = wait(NULL) // 추가된 부분 + int wc = wait(NULL); // 추가된 부분 printf("parent of %d (wc : %d / pid : %d)", wc, rc, (int)getpid()); } } @@ -136,11 +136,11 @@ int main(int argc, char *argv[]) { myargs[0] = strdup("wc"); // 내가 실행할 파일 이름 myargs[1] = strdup("p3.c"); // 실행할 파일에 넘겨줄 argument myargs[2] = NULL; // end of array - execvp(myarges[0], myargs); // wc 파일 실행. + execvp(myargs[0], myargs); // wc 파일 실행. printf("this shouldn't print out") // 실행되지 않음. } else { // (3) parent case - int wc = wait(NULL) // 추가된 부분 + int wc = wait(NULL); // 추가된 부분 printf("parent of %d (wc : %d / pid : %d)", wc, rc, (int)getpid()); } }