3 /* open/read/write/close */
7 * Program grabs data (calculated number of characters) from process2 and prints
8 * grabbed data to the standard output.
11 /** Named pipe used to communicate with process2 */
12 char * read_pipe = "/tmp/process2pipe";
21 /* Reading from process2 */
22 read_descriptor = open(read_pipe, O_RDONLY);
24 int number_of_characters = 0;
27 /* Read data from input pipe */
28 count = read(read_descriptor, &buffer, sizeof(int));
30 fprintf(stderr, "[%s] Fetched: %d bytes\n", "process3", count);
33 fprintf(stderr, "[%s] Process2 send: %d\n", "process3", buffer);
40 close(read_descriptor);