コード例 #1
0
int main()
{
	pipe(fd);          //bulid pipe
	if (fork()==0)     //this is child program
		run_ls();
	else
		run_wc();    //this is parent program
	return 0;
}
コード例 #2
0
int main()
{
    pipe(fd);
    if(fork()==0)
	run_ls();
    else
	run_wc();

    return 0;
}