All pastes #945234 Raw Edit

Someone

public text v1 · immutable
·published 2008-03-16 20:01 UTC
rendered paste body
int * pipeids[fork_num];
  int t;
  for (t =0; t < fork_num; t++) {
    int pipenum[2];
    pipenum[0] = t*2;
    pipenum[1] = t*2+1;
    if (pipe(pipenum) == -1) {
      perror("Failure of pipe");
    }
    *pipeids[t] = pipenum;
  }