#include #include #include int main(){ pid_t pid; int fd[2], n; char buf[10]; pipe(fd); pid = fork(); if(pid == 0){ close(fd[0]); write(fd[1], "FOXLIVER", 9); close(fd[1]); }else{ close(fd[1]); n = read(fd[0], buf, 10); buf[n] = '\0'; printf("Parent receive : %s\n", buf); close(fd[0]); } return 0; }