Having a little issue with pipes
Pipes need their own file descriptor array right? IE:
int fd[2];
pipe(fd);
...if I wanted 2 pipes....
int fd0[2], fd1[2];
pipe(fd0);
pipe(fd1);
...now my question. If I wanted to make 100 pipes, is there a way to write a loop that will create 100 different file-descritor arrays and 100 different pipes (in C)? A program I'm writing requires multiple pipes (one per process) to be all linked together, and the pipes must be created before the fork. Hence, my question.
Pipes need their own file descriptor array right? IE:
int fd[2];
pipe(fd);
...if I wanted 2 pipes....
int fd0[2], fd1[2];
pipe(fd0);
pipe(fd1);
...now my question. If I wanted to make 100 pipes, is there a way to write a loop that will create 100 different file-descritor arrays and 100 different pipes (in C)? A program I'm writing requires multiple pipes (one per process) to be all linked together, and the pipes must be created before the fork. Hence, my question.