int main() { pipe(fd); //bulid pipe if (fork()==0) //this is child program run_ls(); else run_wc(); //this is parent program return 0; }
int main() { pipe(fd); if(fork()==0) run_ls(); else run_wc(); return 0; }