communicating between two child processes with pipes
问题 I'm trying to write code that spawns two child processes that send each other a message over a pipe then terminate. However, when I run the following code only child2 prints it's greeting but child 1 still prints the message it gets from child 2 where child 1 doesn't. Does anybody know what's wrong with my methodology? #include <string.h> #include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <unistd.h> int main(int argc, char** argv) { char chld_1_send[20] = "hello from child