static int pipes[2]; [...] new [...] if ( pipe(pipes) < 0) { printf("Pipe creation failed\n"); perror ("pipe"); exit(EXIT_FAILURE); }