/* * http://sosal.tistory.com/ * made by so_Sal */ #include #include #include int main(void){ char buffer[BUFSIZ]; int fd[2]; if(pipe(fd)==-1){ perror("pipe error..\n"); exit(0); } pid_t pid; pid = fork(); if(pid == -1){ perror("fork error..\n"); exit(0); } else if(pid==0){ //자식 프로세스의 경우// write(fd[1],"This letter is from child",BUFSIZ); sleep(1); //레이스 컨디션 문제 발생. 부모보다 자식이 먼저 fd에 있는 자료를 //가져갈 수 ..