Project/Real_code/book/ch09/ch09-pipeline.c
void right_child(void)
{
	static char *right_argv[] = { "sed", "s/hi/hello/g", NULL };

	close(pipefd[1]);
	close(0);
	dup(pipefd[0]);
	close(pipefd[0]);

	execvp("sed", right_argv);
	_exit(errno == ENOENT ? 127 : 126);
}
/* right_child --- do the work for the right child */
do the work for the right child
do the work for the right child
void right_child(void)
{
	static char *right_argv[] = { "sed", "s/hi/hello/g", NULL };
	close(pipefd[1]);
	close(0);
	dup(pipefd[0]);
	close(pipefd[0]);
	execvp("sed", right_argv);
	_exit(errno == ENOENT ? 127 : 126);
}
void right_child ( void ) { static char * right_argv [ ] = { " " , " " , NULL } ; close ( pipefd [ 1 ] ) ; close ( 0 ) ; dup ( pipefd [ 0 ] ) ; close ( pipefd [ 0 ] ) ; execvp ( " " , right_argv ) ; _exit ( errno == ENOENT ? 127 : 126 ) ; }
right_child --- do the work for the right child
right_child --- do the work for the right child